Class Add

  • All Implemented Interfaces:
    Term

    public class Add
    extends java.lang.Object
    implements Term
    The Add term adds multiple Terms.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Term[] terms  
    • Constructor Summary

      Constructors 
      Constructor Description
      Add​(Term... terms)
      Constructs an Add 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

      • terms

        protected final Term[] terms
    • Constructor Detail

      • Add

        public Add​(Term... terms)
        Constructs an Add term.
        Parameters:
        terms - the terms to be added
    • 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