Package play.data.format
Class Formats.AnnotationNonEmptyFormatter
java.lang.Object
play.data.format.Formatters.AnnotationFormatter<Formats.NonEmpty,String>
play.data.format.Formats.AnnotationNonEmptyFormatter
- Enclosing class:
- Formats
public static class Formats.AnnotationNonEmptyFormatter
extends Formatters.AnnotationFormatter<Formats.NonEmpty,String>
Annotation formatter, triggered by the
@NonEmpty annotation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(Formats.NonEmpty annotation, String text, Locale locale) Binds the field - constructs a concrete value from submitted data.print(Formats.NonEmpty annotation, String value, Locale locale) Unbinds this field - converts a concrete value to plain string
-
Constructor Details
-
AnnotationNonEmptyFormatter
public AnnotationNonEmptyFormatter()
-
-
Method Details
-
parse
Binds the field - constructs a concrete value from submitted data.- Specified by:
parsein classFormatters.AnnotationFormatter<Formats.NonEmpty,String> - Parameters:
annotation- the annotation that triggered this formattertext- the field textlocale- the currentLocale- Returns:
- a new value
- Throws:
ParseException- when the text could not be parsed
-
print
Unbinds this field - converts a concrete value to plain string- Specified by:
printin classFormatters.AnnotationFormatter<Formats.NonEmpty,String> - Parameters:
annotation- the annotation that triggered this formattervalue- the value to unbindlocale- the currentLocale- Returns:
- printable version of the value
-