gov.sns.tools.formula
Class Constant
java.lang.Object
|
+--gov.sns.tools.formula.Constant
- All Implemented Interfaces:
- gov.sns.tools.formula.Value
- public class Constant
- extends java.lang.Object
- implements gov.sns.tools.formula.Value
Represents a constant value. Constant implements the Value interface.
|
Field Summary |
protected double |
value
|
|
Constructor Summary |
Constant(double aValue)
Creates a new instance of Constant. |
|
Method Summary |
double |
doubleValue()
Get the value of the constant as a double. |
java.lang.String |
toString()
Override toString() method to reveal the value of the constant. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
value
protected final double value
Constant
public Constant(double aValue)
- Creates a new instance of Constant.
- Parameters:
aValue - The value assigned to the constant.
doubleValue
public double doubleValue()
- Get the value of the constant as a double.
- Specified by:
doubleValue in interface gov.sns.tools.formula.Value
- Returns:
- The value of the constant as a double.
toString
public java.lang.String toString()
- Override toString() method to reveal the value of the constant.
- Overrides:
toString in class java.lang.Object