Package com.fathzer.soft.javaluator
Class Constant
java.lang.Object
com.fathzer.soft.javaluator.Constant
A constant in an expression.
Some expressions needs constants. For instance it is impossible to perform trigonometric calculus without using pi. A constant allows you to use mnemonic in your expressions instead of the raw value of the constant.
A constant for pi would be defined by :
With such a constant, you will be able to evaluate the expression "sin(pi/4)"
Some expressions needs constants. For instance it is impossible to perform trigonometric calculus without using pi. A constant allows you to use mnemonic in your expressions instead of the raw value of the constant.
A constant for pi would be defined by :
Constant<Double> pi = new Constant<Double>("pi");
With such a constant, you will be able to evaluate the expression "sin(pi/4)"
- Author:
- Jean-Marc Astesana
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Constant
Constructor- Parameters:
name- The mnemonic of the constant.
The name is used in expressions to identified the constants.
-
-
Method Details
-
getName
Gets the mnemonic of the constant.- Returns:
- the id
-