Constructor and Description |
---|
NameableFormatter()
Create a new formatter.
|
NameableFormatter(String nullValue)
Create a new formatter.
|
Modifier and Type | Method and Description |
---|---|
String |
format(Nameable nameableItem)
Format a value by converting it to a string.
|
Nameable |
parseString(String value)
Parse a string and return a value of the correct type.
|
private String nullValue
public NameableFormatter()
public NameableFormatter(String nullValue)
nullValue
- The string to return if a null item is
passed to format(Nameable)
public String format(Nameable nameableItem)
Formatter
public Nameable parseString(String value)
Formatter
parseString
in interface Formatter<Nameable>
value
- The string to parseUnsupportedOperationException
- Always