Class Var

  • All Implemented Interfaces:
    Term

    public class Var
    extends Object
    implements Term
    The Var returns a double value.
    • Field Detail

      • value

        protected double value
    • Constructor Detail

      • 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 Detail

      • 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