jodd.typeconverter
Class BooleanConverter

java.lang.Object
  extended by jodd.typeconverter.BooleanConverter
All Implemented Interfaces:
TypeConverter

public class BooleanConverter
extends java.lang.Object
implements TypeConverter

Converts given object to Boolean. Given object (if not already instance of Boolean) is first converted to String and then analyzed.


Constructor Summary
BooleanConverter()
           
 
Method Summary
 java.lang.Object convert(java.lang.Object value)
          Converts object received as parameter into object of another class.
static java.lang.Boolean valueOf(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanConverter

public BooleanConverter()
Method Detail

valueOf

public static java.lang.Boolean valueOf(java.lang.Object value)

convert

public java.lang.Object convert(java.lang.Object value)
Description copied from interface: TypeConverter
Converts object received as parameter into object of another class. For example, in a IntegerConverter implementation of this interface, this method should convert all objects into Integer object. Conversion has to be done correctly, with investigation of given object.

If conversion is not possible TypeConversionException should be thrown.

Specified by:
convert in interface TypeConverter
Parameters:
value - object to convert from
Returns:
resulting object


Copyright ©2008 Jodd Team