Java String Value Of valueOfBoolean(String string)

Here you can find the source of valueOfBoolean(String string)

Description

Convert a Sting 'TRUE' to 1, otherwise 0.

License

Apache License

Declaration

public static int valueOfBoolean(String string) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from www .ja  v  a2s .  c  om*/
     * Convert a Sting 'TRUE' to 1, otherwise 0.
     */
    public static int valueOfBoolean(String string) {
        return string != null && "TRUE".equalsIgnoreCase(string) ? 1 : 0;
    }
}

Related

  1. valueOf(String stringVal, boolean dVal)
  2. valueOf(String value)
  3. valueOf(String value)
  4. valueOf(String value, boolean defaultValue)
  5. valueOfBoolean(final String s)
  6. valueOfBooleanStr(String str)
  7. valueOfEnum(Class enumClass, String value, E defaultValue)
  8. valueOfEnum(final Class type, final String value)
  9. valueOfIC(Class enumType, String aName)