List of utility methods to do CharSequence Convert
boolean | convertValueToBoolean(CharSequence value, boolean defaultValue) convert Value To Boolean boolean result = false; if (null == value) return defaultValue; if (value.equals("1") || value.equals("true") || value.equals("TRUE")) result = true; return result; |
boolean | convertValueToBoolean(CharSequence value, boolean defaultValue) convert Value To Boolean if (value == null) return defaultValue; return value.equals("1") || value.equals("true") || value.equals("TRUE"); |
int | convertValueToInt(CharSequence charSeq, int defaultValue) convert Value To Int if (null == charSeq) return defaultValue; String nm = charSeq.toString(); int sign = 1; int index = 0; int len = nm.length(); int base = 10; if ('-' == nm.charAt(0)) { ... |
int | convertValueToInt(CharSequence charSeq, int defaultValue) convert Value To Int if (null == charSeq) return defaultValue; String nm = charSeq.toString(); int value; int sign = 1; int index = 0; int len = nm.length(); int base = 10; ... |
int | convertValueToInt(CharSequence charSeq, int defaultValue) convert Value To Int if (charSeq == null) return defaultValue; String nm = charSeq.toString(); int sign = 1; int index = 0; int len = nm.length(); int base = 10; if ('-' == nm.charAt(0)) { ... |
int | convertValueToList(CharSequence value, String[] options, int defaultValue) convert Value To List if (null != value) { for (int i = 0; i < options.length; i++) { if (value.equals(options[i])) return i; return defaultValue; |
int | convertValueToList(CharSequence value, String[] options, int defaultValue) convert Value To List if (null != value) { for (int i = 0; i < options.length; i++) { if (value.equals(options[i])) { return i; return defaultValue; ... |
int | convertValueToList(CharSequence value, String[] options, int defaultValue) convert Value To List if (value != null) for (int i = 0; i < options.length; i++) if (value.equals(options[i])) return i; return defaultValue; |
int | convertValueToUnsignedInt(String value, int defaultValue) convert Value To Unsigned Int if (null == value) return defaultValue; return parseUnsignedIntAttribute(value); |
int | convertValueToUnsignedInt(String value, int defaultValue) convert Value To Unsigned Int if (null == value) { return defaultValue; return parseUnsignedIntAttribute(value); |