public class CharacterTypeConverter extends java.lang.Object implements TypeConverter<java.lang.Character>
| Constructor and Description |
|---|
CharacterTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Character |
convert(java.lang.String input,
java.lang.Class<? extends java.lang.Character> targetType,
java.util.Collection<ValidationError> errors)
Converts the input String to a Character by taking the first character in the
String and returning it.
|
void |
setLocale(java.util.Locale locale)
Does nothing.
|
public void setLocale(java.util.Locale locale)
setLocale in interface TypeConverter<java.lang.Character>locale - the locale that the TypeConverter will be converting from.public java.lang.Character convert(java.lang.String input,
java.lang.Class<? extends java.lang.Character> targetType,
java.util.Collection<ValidationError> errors)
convert in interface TypeConverter<java.lang.Character>input - the String to convert into a single CharactertargetType - the type to convert toerrors - 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.