|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.beanio.types.xml.XmlBooleanTypeHandler
public class XmlBooleanTypeHandler
A type handler implementation for the Boolean class based on the W3C XML Schema boolean datatype specification.
| Field Summary |
|---|
| Fields inherited from interface org.beanio.types.TypeHandler |
|---|
NIL |
| Constructor Summary | |
|---|---|
XmlBooleanTypeHandler()
Constructs a new XmlBooleanTypeHandler. |
|
| Method Summary | |
|---|---|
String |
format(Object value)
Returns Boolean.toString(), or null if value
is null. |
Class<?> |
getType()
Returns the class type supported by this handler. |
boolean |
isNumericFormatEnabled()
Returns whether the numeric format of a XML boolean is used to format Java Boolean types. |
Boolean |
parse(String text)
Parses a Boolean object from the given text. |
void |
setNumericFormatEnabled(boolean numericFormatEnabled)
Sets whether the numeric format of a XML boolean is used to format Java Boolean types. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlBooleanTypeHandler()
| Method Detail |
|---|
public Boolean parse(String text)
throws TypeConversionException
parse in interface TypeHandlertext - the text to parse
TypeConversionException - if the text cannot be parsedpublic String format(Object value)
Boolean.toString(), or null if value
is null.
format in interface TypeHandlervalue - the Java object to format, which may be null
TypeHandler.NIL for XML formatted streamspublic Class<?> getType()
TypeHandler
getType in interface TypeHandlerpublic boolean isNumericFormatEnabled()
public void setNumericFormatEnabled(boolean numericFormatEnabled)
numericFormatEnabled - true if a Boolean is formatted using 0
and 1 instead of 'true' and 'false'
|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||