public class FloatTypeConverter extends NumberTypeConverterSupport implements TypeConverter<java.lang.Float>
Modifier and Type | Field and Description |
---|---|
static float |
MAX_VALUE
The maximum value that can assigned to a float or Float.
|
static float |
MIN_VALUE
The minimum value that can assigned to a float or Float.
|
Constructor and Description |
---|
FloatTypeConverter() |
Modifier and Type | Method and Description |
---|---|
java.lang.Float |
convert(java.lang.String input,
java.lang.Class<? extends java.lang.Float> targetType,
java.util.Collection<ValidationError> errors)
Converts the input to an object of type Double.
|
getLocale, getNumberFormats, parse, preprocess, setLocale
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setLocale
public static final float MIN_VALUE
public static final float MAX_VALUE
public java.lang.Float convert(java.lang.String input, java.lang.Class<? extends java.lang.Float> targetType, java.util.Collection<ValidationError> errors)
convert
in interface TypeConverter<java.lang.Float>
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.