|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.format.EnumFormatter
public class EnumFormatter
A simple formatter for Enum classes that always returns the value of Enum.name(). Intended really only to enable the seamless usage of enums as values in hidden fields, radio buttons, checkboxes etc. it is not intended that this will be used to format Enum values into text fields where a localized value might be more appropriate.
Constructor Summary | |
---|---|
EnumFormatter()
|
Method Summary | |
---|---|
String |
format(Enum<?> input)
Formats the supplied value as a String. |
void |
init()
Does nothing since no initialization is needed. |
void |
setFormatPattern(String formatPattern)
Does nothing. |
void |
setFormatType(String formatType)
Does nothing. |
void |
setLocale(Locale locale)
Does nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumFormatter()
Method Detail |
---|
public void setFormatType(String formatType)
setFormatType
in interface Formatter<Enum<?>>
public void setFormatPattern(String formatPattern)
setFormatPattern
in interface Formatter<Enum<?>>
public void setLocale(Locale locale)
setLocale
in interface Formatter<Enum<?>>
public void init()
init
in interface Formatter<Enum<?>>
public String format(Enum<?> input)
format
in interface Formatter<Enum<?>>
input
- an object of a type that the formatter knows how to format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |