net.sf.seaf.util.convert.simple
Class ConverterToBoolean
java.lang.Object
net.sf.seaf.util.convert.simple.ConverterToBoolean
public class ConverterToBoolean
- extends Object
Converter of any Object to Boolean.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterToBoolean
public ConverterToBoolean()
convert
public static Boolean convert(Object o)
throws IllegalArgumentException
- Converts an Object to Boolean value.
Keeps null as null. Converts 0, false and no to boolean false. Converts
1, true and yes to boolean true.
- Parameters:
o - Object to be converted
- Returns:
- Boolean
- Throws:
IllegalArgumentException - Thrown when the argument cannot be converted to Boolean
Copyright © 2008-2012 SEAF. All Rights Reserved.