Package net.sf.antcontrib.math
Class Numeric
java.lang.Object
net.sf.antcontrib.math.Numeric
- All Implemented Interfaces:
Evaluateable
A numeric value that implements Evaluateable.
- Author:
- inger
-
Constructor Details
-
Numeric
public Numeric()
-
-
Method Details
-
setValue
Set the value for this number. This string must parse to the set datatype, for example, setting value to "7.992" and datatype to INT will cause a number format exception to be thrown. Supports two special numbers, "E" and "PI".- Parameters:
value
- the value for this number
-
evaluate
- Specified by:
evaluate
in interfaceEvaluateable
- Returns:
- the value for this number as a Number. Cast as appropriate to Integer, Long, Float, or Double.
-
setDatatype
Sets the datatype of this number. Allowed values are "int", "long", "float", or "double". -
getDatatype
- Returns:
- the datatype as one of the defined types.
-
toString
-