Package play.data.format
Class Formatters.SimpleFormatter<T>
java.lang.Object
play.data.format.Formatters.SimpleFormatter<T>
- Type Parameters:
T- the type that this formatter will parse and print
- Direct Known Subclasses:
Formats.DateFormatter
- Enclosing class:
- Formatters
Super-type for custom simple formatters.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SimpleFormatter
public SimpleFormatter()
-
-
Method Details
-
parse
Binds the field - constructs a concrete value from submitted data.- Parameters:
text- the field textlocale- the current Locale- Returns:
- a new value
- Throws:
ParseException- if the text could not be parsed into T
-
print
Unbinds this field - transforms a concrete value to plain string.- Parameters:
t- the value to unbindlocale- the currentLocale- Returns:
- printable version of the value
-