Class Sum

  • All Implemented Interfaces:
    PostfixMathCommandI, java.io.Serializable

    public class Sum
    extends PostfixMathCommand
    Adds it arguments sum(1,2,3,4,5) will be 15. Note does not expand array in its arguments so sum([1,2],[3,4]) is [4,6] rather than 10.

    This class serves mainly as an example of a function that accepts any number of parameters. Note that the numberOfParameters is initialized to -1.

    See Also:
    Serialized Form
    • Field Detail

      • addFun

        protected static Add addFun
        Function used to add pairs of items.
    • Constructor Detail

      • Sum

        public Sum()
        Constructor.