Here you can find the source of objectToBoolean(Object o)
public static final boolean objectToBoolean(Object o)
//package com.java2s; //License from project: Apache License public class Main { public static final boolean objectToBoolean(Object o) { return o != null ? Boolean.valueOf(o.toString()).booleanValue() : false; }/* ww w. jav a2s .c o m*/ }