public class BooleanConverter extends AbstractConverter
Boolean
and AtomicBoolean
Objects.Constructor and Description |
---|
BooleanConverter() |
Modifier and Type | Method and Description |
---|---|
String |
getFalseRepresentation() |
String[] |
getTrueRepresentations() |
Class<?>[] |
getTypes()
Returns types handled by the converter.
|
protected String |
internalConvertToString(Object o)
Returns the default "toString" result on provided Object.
|
protected <T> T |
internalConvertToType(Class<T> type,
Object o)
Handles conversion to an handled type.
|
void |
setFalseRepresentation(String falseRepresentation) |
void |
setTrueRepresentations(String[] trueRepresentations) |
Object |
typeConversion(Class<?> type,
Object o)
Overridden to handle primitive default values.
|
convertArrayToString, convertArrayToType, convertCollectionToString, convertCollectionToType, convertionException, convertionException, convertToString, convertToType, stringConversion, toString
public Object typeConversion(Class<?> type, Object o) throws UtilsException
typeConversion
in interface IConverter
typeConversion
in class AbstractConverter
UtilsException
protected String internalConvertToString(Object o) throws UtilsException
AbstractConverter
internalConvertToString
in class AbstractConverter
UtilsException
protected <T> T internalConvertToType(Class<T> type, Object o) throws UtilsException
AbstractConverter
internalConvertToType
in class AbstractConverter
UtilsException
public Class<?>[] getTypes()
IConverter
public String[] getTrueRepresentations()
public void setTrueRepresentations(String[] trueRepresentations)
public String getFalseRepresentation()
public void setFalseRepresentation(String falseRepresentation)