Here you can find the source of toBoolean(String content)
public static boolean toBoolean(String content)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean toBoolean(String content) { switch (content.toLowerCase().trim()) { case "on": case "true": case "yes": return true; case "off": case "false": case "no": return false; }/*from w ww . ja va2s . c om*/ return false; } }