org.mentawai.converter
Class BooleanConverter

java.lang.Object
  extended by org.mentawai.converter.BasicConverter
      extended by org.mentawai.converter.BooleanConverter
All Implemented Interfaces:
Converter

public class BooleanConverter
extends BasicConverter

Author:
Sergio Oliveira

Constructor Summary
BooleanConverter()
           
BooleanConverter(boolean notPresentIsFalse)
           
 
Method Summary
protected  boolean allowNull()
          Override this method if you want to convert null (not-present) values.
 Object convert(Object value)
          Converts an object to another one.
 
Methods inherited from class org.mentawai.converter.BasicConverter
convert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanConverter

public BooleanConverter()

BooleanConverter

public BooleanConverter(boolean notPresentIsFalse)
Method Detail

allowNull

protected boolean allowNull()
Description copied from class: BasicConverter
Override this method if you want to convert null (not-present) values. Default is FALSE.

Overrides:
allowNull in class BasicConverter
Returns:
If this converter should try to convert NULL values.

convert

public Object convert(Object value)
               throws ConversionException
Description copied from class: BasicConverter
Converts an object to another one. Implement this method with the convertion logic.

Specified by:
convert in class BasicConverter
Parameters:
value - The object to convert.
Returns:
The new object converted.
Throws:
ConversionException - if the conversion fail for any reason.


Copyright © 2013. All Rights Reserved.