org.mentawai.converter
Class BooleanConverter
java.lang.Object
org.mentawai.converter.BasicConverter
org.mentawai.converter.BooleanConverter
- All Implemented Interfaces:
- Converter
public class BooleanConverter
- extends BasicConverter
- Author:
- Sergio Oliveira
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanConverter
public BooleanConverter()
BooleanConverter
public BooleanConverter(boolean notPresentIsFalse)
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 © 2012. All Rights Reserved.