Package edu.hws.jcm.data
Class ValueMath
java.lang.Object
edu.hws.jcm.data.ValueMath
- All Implemented Interfaces:
Value
,Serializable
A ValueMath object is an easy way to create Value objects that are computed
from other Value objects. For example, "new ValueMath(a,b,'+')" is an
object whose value is obtained by adding the values of a and b.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ValueMath
Create a ValueMath object whose value is computed by applying an arithmetic operator the values of x and y.- Parameters:
op
- The arithmetic operator that is to be applied to x and y. This should be one of the characters '+', '-', '*', '/', or '^'. (No error is thrown if another character is provided. It will be treated as a '/').
-
ValueMath
Create a ValueMath object whose value is computed as f(x).
-
-
Method Details