public class StringTypeConverter extends java.lang.Object implements TypeConverter<java.lang.String>
Constructor and Description |
---|
StringTypeConverter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convert(java.lang.String input,
java.lang.Class<? extends java.lang.String> targetType,
java.util.Collection<ValidationError> errors)
Simply returns the input String un-modified in any way.
|
void |
setLocale(java.util.Locale locale)
Does Nothing
|
public void setLocale(java.util.Locale locale)
setLocale
in interface TypeConverter<java.lang.String>
locale
- the locale that the TypeConverter will be converting from.public java.lang.String convert(java.lang.String input, java.lang.Class<? extends java.lang.String> targetType, java.util.Collection<ValidationError> errors)
convert
in interface TypeConverter<java.lang.String>
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.