Here you can find the source of tryParseBoolean(String value)
public static Boolean tryParseBoolean(String value)
//package com.java2s; //License from project: Apache License public class Main { public static Boolean tryParseBoolean(String value) { if (value == null) { return null; }/*from w w w. j a va 2 s . c o m*/ if (value.equalsIgnoreCase("true")) { return true; } else if (value.equalsIgnoreCase("false")) { return false; } return null; } }