Here you can find the source of toBool(String val)
public static boolean toBool(String val)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean toBool(String val) { val = val.toLowerCase(); return (val.equals("1") || val.equals("on") || val.equals("yes")); }/* w w w . jav a 2 s.c o m*/ }