Here you can find the source of toBoolean(String value)
private static Object toBoolean(String value)
//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; } }