- All Implemented Interfaces:
Term
The
Var returns a double value.
-
-
Constructor Summary
Constructors
Constructs a
Var with the initial value 0.
Constructs a
Var with a given
value.
-
Method Summary
double
Calculates the result of this
Term.
double
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
value
protected double value
-
Constructor Details
-
Var
public Var()
Constructs a
Var with the initial value 0.
-
Var
public Var(double value)
Constructs a
Var with a given
value.
- Parameters:
value - the value
-
Method Details
-
getValue
public double getValue()
Returns the value.
- Returns:
- the value
-
setValue
public void setValue(double value)
Sets the value.
- Parameters:
value - the value to set
-
calculate
public double calculate(double... values)
Description copied from interface: Term
Calculates the result of this
Term.
- Specified by:
calculate in interface Term
- Parameters:
values - the values
- Returns:
- the result