org.apache.commons.math3.util

## Class DefaultTransformer

- java.lang.Object
- - org.apache.commons.math3.util.DefaultTransformer

All Implemented Interfaces:
  Serializable, NumberTransformer

    public class DefaultTransformer
    extends Object
    implements NumberTransformer, Serializable

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.

Version:
  $Id: DefaultTransformer.java 1416643 2012-12-03 19:37:14Z tn $
See Also:
  Serialized Form

### Field Summary

Fields
`private static long` `serialVersionUID` Serializable version identifier

### Constructor Summary

Constructors
Constructor and Description
`DefaultTransformer()`

### Method Summary

Methods
`boolean` `equals(Object other)`
`int` `hashCode()`
`double` `transform(Object o)` Implementing this interface provides a facility to transform from Object to Double.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### serialVersionUID

    private static final long serialVersionUID

Serializable version identifier

See Also:
  Constant Field Values

### Constructor Detail

#### DefaultTransformer

    public DefaultTransformer()

### Method Detail

#### transform

    public double transform(Object o)
                     throws NullArgumentException,
                            MathIllegalArgumentException

Description copied from interface: `NumberTransformer`
Implementing this interface provides a facility to transform from Object to Double.

Specified by:
  `transform` in interface `NumberTransformer`
Parameters:
  `o` - the object that gets transformed.
Returns:
  a double primitive representation of the Object o.
Throws:
  `NullArgumentException` - if Object `o` is `null`.
  `MathIllegalArgumentException` - if Object `o` cannot successfully be transformed
See Also:
  Commons Collections Transformer

#### equals

    public boolean equals(Object other)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`