Here you can find the source of toBoolean(Object v)
private static Boolean toBoolean(Object v)
//package com.java2s; //License from project: Apache License public class Main { private static Boolean toBoolean(Object v) { if (null == v) return null; if (v instanceof Boolean) return (Boolean) v; return Boolean.parseBoolean(v.toString()); }//from www.j a v a2s . c o m }