public class EnumeratedTypeConverter extends Object implements TypeConverter<Enum>
| Constructor and Description |
|---|
EnumeratedTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
Enum |
convert(String input,
Class<? extends Enum> targetType,
Collection<ValidationError> errors)
Convert a String to the target type supported by this converter.
|
void |
setLocale(Locale locale)
Does nothing at present due to the fact that enumerated types don't support localization
all that well.
|
public void setLocale(Locale locale)
setLocale in interface TypeConverter<Enum>locale - the locale that the TypeConverter will be converting from.public Enum convert(String input, Class<? extends Enum> targetType, Collection<ValidationError> errors)
TypeConverterconvert in interface TypeConverter<Enum>input - the String being convertedtargetType - the Class representing the type of the property to which the return
value of the conversion will be assigned. In many cases this can be ignored as
converters will return a single type more often than not.errors - an empty collection of validation errors that should be populated by the
converter for any errors that occur during validation that are user input related.© Copyright 2005-2006, Stripes Development Team.