List of utility methods to do Long Number From
long[] | toLongs(int[] array) to Longs long[] ret = new long[array.length]; for (int e = 0; e < array.length; e++) { ret[e] = array[e]; return ret; |
long[] | toLongs(Long[] values) to Longs return toLongs(values, DEFAULT_LONG);
|
long | toLongTime() to Long Time return System.currentTimeMillis();
|
Long | toLongTimestamp(Object cell) to Long Timestamp if (cell instanceof String) { Double d = Double.valueOf((String) cell); d = new Double(d * 1000d); return d.longValue(); } else { return null; |
long | toLongUnsigned(int intValue) Convert a signed int to a unsigned value in a long long mask = 0x7fffffff; mask += (long) 1 << 31; return (intValue & mask); |
long | toLongValue(byte... bytes) to Long Value return toLongValue(bytes, 0, bytes.length);
|
long | toLongValue(final Object o) to Long Value if (o instanceof Long) return ((Long) o).longValue(); return 0; |
Long | toLongValue(final String candidateString) Parses the given candidate string into a Long . Long result; if (candidateString == null || candidateString.length() == 0) throw new NumberFormatException("Cannot parse zero length string."); String longTxtVal = candidateString; if (longTxtVal.length() > 2 && (longTxtVal.endsWith("l") || longTxtVal.endsWith("L"))) longTxtVal = longTxtVal.substring(0, longTxtVal.length() - 1); result = new Long(longTxtVal); return result; ... |
Long | toLongValue(Object value) to Long Value if ((value == null) || (value.getClass() == Long.class)) { return (Long) value; if (value instanceof Number) { return ((Number) value).longValue(); throw new IllegalArgumentException("value must be instance of Number."); |