|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.formatter.IdentifiableFormatter
public class IdentifiableFormatter
Formatter to handle Identifiable
items. The formatter
returns the ID of the item. This formatter can not parse strings.
Field Summary | |
---|---|
private String |
nullValue
|
Constructor Summary | |
---|---|
IdentifiableFormatter()
Create a new formatter. |
|
IdentifiableFormatter(String nullValue)
Create a new formatter. |
Method Summary | |
---|---|
String |
format(Identifiable value)
Format a value by converting it to a string. |
Identifiable |
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 IdentifiableFormatter()
public IdentifiableFormatter(String nullValue)
nullValue
- The string to return if a null item is
passed to format(Identifiable)
Method Detail |
---|
public String format(Identifiable value)
Formatter
format
in interface Formatter<Identifiable>
value
- The value to format
public Identifiable parseString(String value)
Formatter
parseString
in interface Formatter<Identifiable>
value
- The string to parse
UnsupportedOperationException
- Always
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |