List of utility methods to do Object to Short
Short | castShort(Object o) cast Short if (o instanceof Number) { return ((Number) o).shortValue(); return null; |
Short | castShort(Object o) Casts a value to a short. if (o == null) { return null; if (o instanceof Number) { return ((Number) o).shortValue(); try { return Short.valueOf(o.toString()); ... |
short | castShort(Object val) cast Short return (val instanceof String) ? Short.parseShort(val.toString().trim()) : ((Number) val).shortValue(); |
float[] | castShortToFloat(short[] x) cast Short To Float float[] res = new float[x.length]; for (int i = 0; i < x.length; i++) res[i] = x[i]; return res; |
short | castToShort(final int value) cast To Short final short result = (short) value; if (result != value) { throw new ArithmeticException("Out of range: " + value); return result; |
Short | castToShort(final String uid) cast To Short try { return Short.decode(uid); } catch (NumberFormatException nfe) { return null; |
Short | castToShort(Object value) cast To Short if (value == null) { return null; if (value instanceof Number) { return ((Number) value).shortValue(); if (value instanceof String) { String strVal = (String) value; ... |
Short | castToShort(Object value) cast To Short return (Short) value;
|