List of utility methods to do Object to Long
Long | castLong(Object o) cast Long Long value = null; if (o != null) { value = Long.parseLong(o.toString()); return value; |
Long | castLong(Object o) Casts a value to a double. if (o == null) { return null; if (o instanceof Number) { return ((Number) o).longValue(); } else { try { return Long.valueOf(o.toString()); ... |
long | castLong(Object val) cast Long return (val instanceof String) ? Long.parseLong(val.toString().trim()) : ((Number) val).longValue(); |
int | castLong2Int(long x) cast Long Int if (x >= Integer.MAX_VALUE) { return Integer.MAX_VALUE; } else if (x <= Integer.MIN_VALUE) { return Integer.MIN_VALUE; return (int) x; |
int | castLongtoUInt(long x) cast Longto U Int return (int) (x & 0x00000000ffffffffL); |
Long | castToLong(final String uid) cast To Long try { return Long.decode(uid); } catch (NumberFormatException nfe) { return null; |
Long | castToLong(Object object) Sometimes ELP's version of cast is misbehaving if (object != null) { if (object instanceof Long) return (Long) object; else return Long.valueOf(object.toString()); return null; |
Long | castToLong(Object value) cast To Long if (value == null) { return null; if (value instanceof Number) { return ((Number) value).longValue(); if (value instanceof String) { String strVal = (String) value; ... |
Long | castToLong(Object value) cast To Long return (Long) value;
|
Long[] | castToLongArray(Object[] array) EPL has embedded cast method, but it doesn't cover arrays if (array != null) { Long[] retArray = new Long[array.length]; int i = 0; for (Object element : array) { retArray[i] = element == null ? null : (Long) element; i++; return retArray; ... |