List of utility methods to do Integer Convert To
String | fromInteger(int value) from Integer return Integer.toString(value);
|
String | fromInteger(Integer value) integerValue String result = "0"; if (value != null) result = String.valueOf(value.intValue()); return result; |
String | fromInteger(Integer value, String defaultValue) from Integer if (value != null) { return value.toString(); return defaultValue; |
String[] | fromIntegers(Integer[] values, String defaultValue) from Integers String[] result = new String[values == null ? 0 : values.length]; for (int i = 0; i < result.length; i++) { result[i] = fromInteger(values[i], defaultValue); return result; |
Integer | fromIntegerString(String integerString) Deserializes an Integer from a given string. if (integerString == null) { return null; try { Integer i = new Integer(integerString); return i; } catch (Exception e) { return null; |
String | fromInternalForm(String internalForm) from Internal Form return internalForm.replace('/', '.'); |
long | fromIntLong(byte[] value) from Int Long return fromIntLong(value, 0);
|
String[] | fromInts(int[] values) from Ints String[] result = new String[values == null ? 0 : values.length]; for (int i = 0; i < result.length; i++) { result[i] = fromInt(values[i]); return result; |
Integer | fromIntString(Object obj) Parses the specified string as an Integer instance. String intString = (obj == null) ? null : obj.toString(); if (intString == null || intString.trim().isEmpty()) { return ZERO_INT; try { return Integer.parseInt(intString); } catch (Exception e) { return 0; ... |
byte[] | fromIntWithPrefix(byte prefix, int v) from Int With Prefix return new byte[] { prefix, (byte) ((v >> 24) & 0xff), (byte) ((v >> 16) & 0xff), (byte) ((v >> 8) & 0xff), (byte) ((v >> 0) & 0xff), }; |