检查Short是否为null

@param value 值
@param elseValue 为null返回的值

@return {@link Short}

@since 1.0.8
353901
public static Short checkNull(Short value, short elseValue) {
        return checkNull(value, Short.valueOf(elseValue));
    }
553898
public void writeShort(short value) throws IOException {
    if (2 > buf.length - pos) {
      //not enough space remaining
      byte[] arr = new byte[2];
      arr[0] = (byte) value;
      arr[1] = (byte) (value >> 8);
      write(arr, 0, 2);
      return;
    }

    buf[pos] = (byte) value;
    buf[pos + 1] = (byte) (value >> 8);
    pos += 2;
  }
1110877
public static String leftTrim(String value, String leftTrim) {
        if (Checker.isEmpty(value) || Checker.isEmpty(leftTrim)) {
            return value;
        }
        return value.indexOf(leftTrim) == 0 ? leftTrim(value.substring(leftTrim.length()), leftTrim) : value;
    }
945967
public IsEmptyBuilder append(final Object value) {
        if(isNotEmpty()) {
            return this;
        }

        if(value == null) {
            return this;
        }

        final Class<?> clazz = value.getClass();
        if(clazz.isPrimitive()) {
            if(clazz.equals(Boolean.TYPE)) {
                return append((boolean) value);
            } else if(clazz.equals(Byte.TYPE)) {
                return append((byte) value);
            } else if(clazz.equals(Character.TYPE)) {
                return append((char) value);
            } else if(clazz.equals(Short.TYPE)) {
                return append((short) value);
            } else if(clazz.equals(Integer.TYPE)) {
                return append((int) value);
            } else if(clazz.equals(Long.TYPE)) {
                return append((long) value);
            } else if(clazz.equals(Float.TYPE)) {
                return append((float) value);
            } else if(clazz.equals(Double.TYPE)) {
                return append((double) value);
            }

        } else if(clazz.isArray()) {
            if(value instanceof boolean[]) {
                return append((boolean[]) value);
            } else if(value instanceof char[]) {
                return append((char[]) value);
            }
601407
public static int writeShorts(final BitOutput bitOutput, final int lengthSize, final int shortSize,
                                  final short[] value)
            throws IOException {
        if (bitOutput == null) {
            throw new NullPointerException("bitOutput is null");
        }
        requireValidSizeInt(true, lengthSize);
        requireValidSizeShort(false, shortSize);
        if (value == null) {
            throw new NullPointerException("value is null");
        }
        final int length = value.length & ((1 << lengthSize) - 1);
        bitOutput.writeInt(true, lengthSize, length);
        for (int i = 0; i < length; i++) {
            bitOutput.writeShort(false, shortSize, value[i]);
        }
        return length;
    }
895556
public static Optional<String> getSpecifiedValue(@Nullable String value) {
        return isSpecified(value) ? Optional.ofNullable(value) : Optional.empty();
    }
438862
protected void addValidValue(String value)
	{
		if(value!=null && !value.isEmpty())
			validValues.add(value.toLowerCase());
	}
390002
private List<Short> asShortList(Object value) {
        short[] values = (short[]) value;
        List<Short> list = new ArrayList<Short>(values.length);
        for (short shortValue : values) {
            list.add(shortValue);
        }
        return list;
    }
723419
public static Long checkNull(Long value, long elseValue) {
        return checkNull(value, Long.valueOf(elseValue));
    }
409749
public static <T> T check(T value, T elseValue, boolean res) {
        return res ? value : elseValue;
    }
965400
public short getShort(String columnName, short defaultValue) {
        int index = getColumnIndex(columnName);
        if (isValidIndex(index)) {
            return getShort(index);
        } else {
            return defaultValue;
        }
    }
99069
public static Short readShort(String value, Short defaultValue) {
		if (!StringUtils.hasText(value)) return defaultValue;
		
		return Short.valueOf(value);
	}
633871
public short getOrElse(String key, short defaultValue) {
        int hash = d_keys.number(key);
        if (hash == -1)
            return defaultValue;

        return d_values[hash - 1];
    }
845267
public static Long checkNull(Long value, Long elseValue) {
        return isNull(value) ? elseValue : value;
    }
473567
public static <T> T check(T value, T elseValue, IChecker checker) {
        return check(value, elseValue, checker.check());
    }
34696
public static Integer checkNull(Integer value, Integer elseValue) {
        return isNull(value) ? elseValue : value;
    }
891681
public static Short stringToShort(String strString) throws Exception
    {
        Number objData;
        initGlobals();      // Make sure you have the utilities
        if ((strString == null) || (strString.equals(Constant.BLANK)))
            return null;
        strString = DataConverters.stripNonNumber(strString);
        try   {
            synchronized (gIntegerFormat)
            {
                objData = gIntegerFormat.parse(strString);
            }
            if (!(objData instanceof Short))
            {
                if (objData instanceof Number)
                    objData = new Short(objData.shortValue());
                else
                    objData = null;
            }
        } catch (ParseException ex)   {
            objData = null;
        }
        if (objData == null)
        {
            try   {
                objData = new Short(strString);
            } catch (NumberFormatException ex)  {
                throw ex;
            }
        }
        return (Short)objData;
    }