Android Utililty Methods CharSequence Convert

List of utility methods to do CharSequence Convert

Description

The list of methods to do CharSequence Convert are organized into topic(s).

Method

booleanconvertValueToBoolean(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;
booleanconvertValueToBoolean(CharSequence value, boolean defaultValue)
convert Value To Boolean
if (value == null)
    return defaultValue;
return value.equals("1") || value.equals("true")
        || value.equals("TRUE");
intconvertValueToInt(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)) {
...
intconvertValueToInt(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;
...
intconvertValueToInt(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)) {
...
intconvertValueToList(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;
intconvertValueToList(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;
...
intconvertValueToList(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;
intconvertValueToUnsignedInt(String value, int defaultValue)
convert Value To Unsigned Int
if (null == value)
    return defaultValue;
return parseUnsignedIntAttribute(value);
intconvertValueToUnsignedInt(String value, int defaultValue)
convert Value To Unsigned Int
if (null == value) {
    return defaultValue;
return parseUnsignedIntAttribute(value);