Here you can find the source of convertObjectToBoolean(Object value)
public static boolean convertObjectToBoolean(Object value) throws IllegalArgumentException
//package com.java2s; public class Main { /**//from ww w .j a v a 2 s. co m * Throws an IllegalArgumentException if the provided value is null. */ public static boolean convertObjectToBoolean(Object value) throws IllegalArgumentException { if (value != null) { if (value instanceof Boolean) { return ((Boolean) value).booleanValue(); } else { return Boolean.valueOf(value.toString()).booleanValue(); } } else { throw new IllegalArgumentException("Property value was null so it couldn't be converted to a boolean."); } } }