List of utility methods to do Long Number Create
long | toLong(Object object, long defaultValue) Extract the value represented by the given object (Number or String). if (object == null) { return defaultValue; if (object instanceof Number) { return ((Number) object).longValue(); try { Double value = Double.valueOf(object.toString().trim()); ... |
Long | toLong(Object object, Long defaultValue) to Long if (object == null) { return defaultValue; if (object instanceof Number) { return ((Number) object).longValue(); try { Double value = Double.valueOf(object.toString().trim()); ... |
Long | toLong(Object objectToConvert) Given an Object of type Integer or Long, converts the Object instance to a Long. Long convertedLongValue; if (objectToConvert instanceof Integer) { convertedLongValue = new Long((Integer) objectToConvert); } else { convertedLongValue = (Long) objectToConvert; return convertedLongValue; |
long | toLong(Object objValue) to Long if (objValue != null) { if (objValue instanceof Number) { return ((Number) objValue).longValue(); } else { return Long.parseLong(objValue.toString()); } else return 0; ... |
long | toLong(Object oid) to Long return Long.parseLong(String.valueOf(oid));
|
long | toLong(Object property, long defaultValue) to Long if (property == null) { return defaultValue; return Long.parseLong(String.valueOf(property)); |
Long | toLong(Object val) to Long return toDouble(val).longValue(); |
long | toLong(Object value) to Long return (value == null || "null".equals(value.toString())) ? 0 : Long.parseLong(value.toString().trim()); |
Long | toLong(Object value) Convert an Object to a Long. if (value == null) return null; if (value instanceof Long) return (Long) value; if (value instanceof String) { if ("".equals((String) value)) return null; return new Long((String) value); ... |
Long | toLong(Object value) to Long if (value instanceof Long) return (Long) value; if (value instanceof Integer) { Integer v = (Integer) value; return v.longValue(); if (value instanceof String) { try { ... |