|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 TypeHandler
text
- 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 TypeHandler
value
- the Java object to format, which may be null
TypeHandler.NIL
for XML formatted streamspublic Class<?> getType()
TypeHandler
getType
in interface TypeHandler
public 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 |