public class BooleanTypeConverter extends Object implements TypeConverter<Boolean>
| Constructor and Description |
|---|
BooleanTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
convert(String input,
Class<? extends Boolean> targetType,
Collection<ValidationError> errors)
Converts a String to a Boolean in accordance with the specification laid out in the
class level javadoc.
|
void |
setLocale(Locale locale)
Does nothing currently due to the fact that there is no localization support for
Booleans in Java.
|
public void setLocale(Locale locale)
setLocale in interface TypeConverter<Boolean>locale - the locale that the TypeConverter will be converting from.public Boolean convert(String input, Class<? extends Boolean> targetType, Collection<ValidationError> errors)
convert in interface TypeConverter<Boolean>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.