public static boolean toBooleanValue(Object o) throws PageException {
	if (o instanceof Boolean) return ((Boolean) o).booleanValue();
	else if (o instanceof Number) return toBooleanValue(((Number) o).doubleValue());
	else if (o instanceof String) return toBooleanValue((String) o);
	else if (o instanceof Castable) return ((Castable) o).castToBooleanValue();
	else if (o == null) return toBooleanValue("");
	else if (o instanceof ObjectWrap) return toBooleanValue(((ObjectWrap) o).getEmbededObject());
	throw new CasterException(o, "boolean");
    }
public static boolean toBooleanValue ( Object o ) throws PageException { if ( o instanceof Boolean ) return ( ( Boolean ) o ) . booleanValue ( ) ; else if ( o instanceof Number ) return toBooleanValue ( ( ( Number ) o ) . doubleValue ( ) ) ; else if ( o instanceof String ) return toBooleanValue ( ( String ) o ) ; else if ( o instanceof Castable ) return ( ( Castable ) o ) . castToBooleanValue ( ) ; else if ( o == null ) return toBooleanValue ( "" ) ; else if ( o instanceof ObjectWrap ) return toBooleanValue ( ( ( ObjectWrap ) o ) . getEmbededObject ( ) ) ; throw new CasterException ( o , "boolean" ) ; }
cast a Object to a boolean value (primitive value type)

@param o Object to cast
@return casted boolean value
@throws PageException