* @see <a href="http://commons.apache.org/collections/api-release/org/apache/commons/collections/Transformer.html"/>
*/
public double transform(Object o) throws MathException{
if (o == null) {
throw new MathException("Conversion Exception in Transformation, Object is null");
}
if (o instanceof Number) {
return ((Number)o).doubleValue();
}
try {
return Double.valueOf(o.toString()).doubleValue();
} catch (NumberFormatException e) {
throw new MathException(e,
"Conversion Exception in Transformation: {0}", e.getMessage());
}
}