|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.formatter.ItemTypeFormatter
public class ItemTypeFormatter
Formatter implementation that converts an integer into it's Item representation and the uses name() as the formatted value.
Field Summary | |
---|---|
private String |
nullValue
|
Constructor Summary | |
---|---|
ItemTypeFormatter()
Create a new formatter. |
|
ItemTypeFormatter(String nullValue)
Create a new formatter. |
Method Summary | |
---|---|
String |
format(Integer value)
Format a value by converting it to a string. |
Integer |
parseString(String value)
Parse a string and return a value of the correct type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String nullValue
Constructor Detail |
---|
public ItemTypeFormatter()
public ItemTypeFormatter(String nullValue)
nullValue
- The string to return if a null item is
passed to format(Integer)
Method Detail |
---|
public String format(Integer value)
Formatter
format
in interface Formatter<Integer>
value
- The value to format
public Integer parseString(String value)
Formatter
parseString
in interface Formatter<Integer>
value
- The string to parse
|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |