public class ExtendedPropertyFormatter<T> extends Object implements Formatter<T>
ExtendedProperty.getUrl(Object)
method.Modifier and Type | Field and Description |
---|---|
private ExtendedProperty |
ep |
private Formatter<T> |
valueFormatter |
Constructor and Description |
---|
ExtendedPropertyFormatter(ExtendedProperty ep,
Formatter<T> valueFormatter)
Create an extended property formatter.
|
Modifier and Type | Method and Description |
---|---|
String |
format(T value)
Format a value by converting it to a string.
|
T |
parseString(String value)
Parse a string and return a value of the correct type.
|
private ExtendedProperty ep
public ExtendedPropertyFormatter(ExtendedProperty ep, Formatter<T> valueFormatter)
ep
- The extended propertyvalueFormatter
- Formatter to use for the valuespublic String format(T value)
Formatter
public T parseString(String value)
Formatter
parseString
in interface Formatter<T>
value
- The string to parse