org.springframework.flex.core.io
Class NumberConverter
java.lang.Object
org.springframework.flex.core.io.NumberConverter
- All Implemented Interfaces:
- GenericConverter
public class NumberConverter
- extends Object
- implements GenericConverter
GenericConverter
implementation that converts between Number
types. The conversion logic is:
- If the value is
null
, convert to Double.NaN
- If the value is
Double.NaN
, convert to null
- Otherwise, if the source type and target type differ (ie they are different
Number
subclasses),
convert the value to the target type
- Author:
- Jeremy Grelle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumberConverter
public NumberConverter()
convert
public Object convert(Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType)
- Specified by:
convert
in interface GenericConverter
getConvertibleTypes
public Set<GenericConverter.ConvertiblePair> getConvertibleTypes()
- Specified by:
getConvertibleTypes
in interface GenericConverter
Copyright © 2011. All Rights Reserved.