Here you can find the source of null2Boolean(Object s)
public static boolean null2Boolean(Object s)
//package com.java2s; //License from project: Apache License public class Main { public static boolean null2Boolean(Object s) { boolean v = false; if (s != null) try { v = Boolean.parseBoolean(s.toString()); } catch (Exception localException) { }//from ww w. ja v a2 s . com return v; } }