Here you can find the source of tryParseBoolean(String value)
public static boolean tryParseBoolean(String value)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w .java 2 s .c o m*/ * Returns whether or not the String can be parsed as an Boolean */ public static boolean tryParseBoolean(String value) { return value.equals("true") || value.equals("false"); } }