Java Boolean From toBoolean(String value)

Here you can find the source of toBoolean(String value)

Description

Returns the Boolean represented by the given string, or null if not a boolean value.

License

Open Source License

Declaration

private static Object toBoolean(String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**// w w  w  .ja v  a 2 s. c  o m
     * Returns the Boolean represented by the given string, or null if not a boolean value.
     */
    private static Object toBoolean(String value) {
        return "true".equalsIgnoreCase(value) ? Boolean.TRUE :

                "false".equalsIgnoreCase(value) ? Boolean.FALSE :

                        null;
    }
}

Related

  1. toBoolean(String value)
  2. toBoolean(String value)
  3. toBoolean(String value)
  4. toBoolean(String value)
  5. toBoolean(String value)
  6. toBoolean(String value)
  7. toBoolean(String value, boolean _default)
  8. toBoolean(String value, boolean dEfault)
  9. toBoolean(String value, boolean defaultValue)