public class ValueTypeFormatter extends java.lang.Object implements Formatter<java.lang.Integer>
Type
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
nullValue |
Constructor and Description |
---|
ValueTypeFormatter()
Create a new formatter.
|
ValueTypeFormatter(java.lang.String nullValue)
Create a new formatter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.Integer value)
Format a value by converting it to a string.
|
java.lang.Integer |
parseString(java.lang.String value)
Parse a string and return a value of the correct type.
|
public ValueTypeFormatter()
public ValueTypeFormatter(java.lang.String nullValue)
nullValue
- The string to return if a null item is
passed to format(Integer)
public java.lang.String format(java.lang.Integer value)
Formatter
public java.lang.Integer parseString(java.lang.String value)
Formatter
parseString
in interface Formatter<java.lang.Integer>
value
- The string to parse