Class Sub

  • All Implemented Interfaces:
    Term

    public class Sub
    extends java.lang.Object
    implements Term
    The Sub term subtracts two Terms.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sub​(Term minuend, Term subtrahend)
      Constructs a Sub term.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double calculate​(double... values)
      Calculates the result of this Term.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • minuend

        protected final Term minuend
      • subtrahend

        protected final Term subtrahend
    • Constructor Detail

      • Sub

        public Sub​(Term minuend,
                   Term subtrahend)
        Constructs a Sub term.
        Parameters:
        minuend - the minuend
        subtrahend - the subtrahend
    • Method Detail

      • 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