Package org.apache.commons.math3.util
Class DefaultTransformer
java.lang.Object
org.apache.commons.math3.util.DefaultTransformer
- All Implemented Interfaces:
Serializable
,NumberTransformer
A Default NumberTransformer for java.lang.Numbers and Numeric Strings. This
provides some simple conversion capabilities to turn any java.lang.Number
into a primitive double or to turn a String representation of a Number into
a double.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultTransformer
public DefaultTransformer()
-
-
Method Details
-
transform
Description copied from interface:NumberTransformer
Implementing this interface provides a facility to transform from Object to Double.- Specified by:
transform
in interfaceNumberTransformer
- Parameters:
o
- the object that gets transformed.- Returns:
- a double primitive representation of the Object o.
- Throws:
NullArgumentException
- if Objecto
isnull
.MathIllegalArgumentException
- if Objecto
cannot successfully be transformed- See Also:
-
equals
-
hashCode
public int hashCode()
-