net.sourceforge.jeuclid.context.typewrapper
Class NumberTypeWrapper
java.lang.Object
   net.sourceforge.jeuclid.context.typewrapper.AbstractSimpleTypeWrapper
net.sourceforge.jeuclid.context.typewrapper.AbstractSimpleTypeWrapper
       net.sourceforge.jeuclid.context.typewrapper.NumberTypeWrapper
net.sourceforge.jeuclid.context.typewrapper.NumberTypeWrapper
- All Implemented Interfaces: 
- Serializable, TypeWrapper
- public final class NumberTypeWrapper 
- extends AbstractSimpleTypeWrapper
Converting String to Numbers and vice versa is also straightforward.
- Version:
- $Revision: 03dc0884e86f $
- See Also:
- Serialized Form
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NumberTypeWrapper
public NumberTypeWrapper(Class<? extends Number> valueType)
- Simple constructor.
 
- Parameters:
- valueType- a subclass of Number
 
getInstance
public static TypeWrapper getInstance(Class<? extends Number> valueType)
- 
- Parameters:
- valueType- a subclass of Number
- Returns:
- the singleton instance.
 
fromString
public Object fromString(String value)
- Attempts to convert a parameter value expressed as string into an
 instance of the appropriate (for this parameter) type.
 
- 
- Specified by:
- fromStringin interface- TypeWrapper
- Overrides:
- fromStringin class- AbstractSimpleTypeWrapper
 
- 
- Parameters:
- value- parameter value as string
- Returns:
- parameter value as an instance of the proper type
 
Copyright © 2002-2010 The JEuclid project. All Rights Reserved.