net.sourceforge.stripes.validation
Class DoubleTypeConverter
java.lang.Object
net.sourceforge.stripes.validation.NumberTypeConverterSupport
net.sourceforge.stripes.validation.DoubleTypeConverter
- All Implemented Interfaces:
- TypeConverter<Double>
public class DoubleTypeConverter
- extends NumberTypeConverterSupport
- implements TypeConverter<Double>
Basic TypeConverter that will convert from Strings to Numbers of type Double.
- Author:
- Tim Fennell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DoubleTypeConverter
public DoubleTypeConverter()
convert
public Double convert(String input,
Class<? extends Double> targetType,
Collection<ValidationError> errors)
- Converts the input to an object of type Double.
- Specified by:
convert
in interface TypeConverter<Double>
- Parameters:
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.
- Returns:
- T an instance of the converted type, or null if the input cannot be converted
? Copyright 2005-2006, Stripes Development Team.