|
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.StringTypeHandler
public class StringTypeHandler
A type handler implementation for the String class.
| Field Summary |
|---|
| Fields inherited from interface org.beanio.types.TypeHandler |
|---|
NIL |
| Constructor Summary | |
|---|---|
StringTypeHandler()
|
|
| Method Summary | |
|---|---|
String |
format(Object value)
Formats the value by calling Object.toString(). |
Class<?> |
getType()
Returns the class type supported by this handler. |
boolean |
isNullIfEmpty()
Returns true if empty string values are parsed as null. |
boolean |
isTrim()
Returns true if parse(String) should trim the text. |
String |
parse(String text)
Parses a String from the given text. |
void |
setNullIfEmpty(boolean nullIfEmpty)
Set to true if the parsed empty strings should be converted to null. |
void |
setTrim(boolean trim)
Set to true to trim text when parsing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringTypeHandler()
| Method Detail |
|---|
public String parse(String text)
parse in interface TypeHandlertext - the text to parse
public String format(Object value)
Object.toString().
format in interface TypeHandlervalue - the value to format
public Class<?> getType()
TypeHandler
getType in interface TypeHandlerpublic boolean isTrim()
public void setTrim(boolean trim)
trim - true if text should be trimmed when parsedpublic boolean isNullIfEmpty()
public void setNullIfEmpty(boolean nullIfEmpty)
nullIfEmpty - true< to convert empty string to null
|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||