List of utility methods to do String to Long
Long | asLong(String param) as Long if (param == null) { return null; if (param instanceof String) { return Long.valueOf(param); } else { throw new IllegalArgumentException("Invalid agrument type. Convertion can be made only from String."); |
long | asLong(String str) as Long if (str != null && str.length() > 0) try { return Long.parseLong(str.trim()); } catch (Exception e) { return 0; |
long | asLong(String str, long defaultValue) as Long try { return Long.parseLong(str); } catch (Exception e) { return defaultValue; |
Long | asLong(String string) Converts string to long return (string == null) ? null : Long.valueOf(string);
|
Long | asLong(String v) as Long try { return (v != null) ? Long.valueOf(v) : null; } catch (NumberFormatException ex) { return null; |
Long | asLong(String value) Returns the long corresponding to the given string value . return asLong(value, null);
|
long | asLong(String value) Converts a String value into a long .
return Long.parseLong(value);
|
long | atol(final String str, final long def) atol try { return Long.parseLong(str); } catch (final Exception ex) { ex.printStackTrace(); return def; |
long | atol(String pString_) String to long converter. return Long.parseLong(pString_, 10);
|
long | atol(String s) atol if (s == null) return 0; long result = 0; try { result = Long.parseLong(s); } catch (NumberFormatException e) { return result; ... |