1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.math.util;
17
18 import org.apache.commons.math.MathException;
19
20 /**
21 * Subclasses implementing this interface can transform Objects to doubles.
22 * @version $Revision: 155427 $ $Date: 2005-02-26 06:11:52 -0700 (Sat, 26 Feb 2005) $
23 */
24 public interface NumberTransformer {
25
26 /**
27 * Implementing this interface provides a facility to transform
28 * from Object to Double.
29 *
30 * @param o the Object to be transformed.
31 * @return the double value of the Object.
32 * @throws MathException if the Object can not be transformed into a Double.
33 */
34 double transform(Object o) throws MathException;
35 }