JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Sum

java.lang.Object
  |
  +--com.klg.jclass.util.formulae.Operation
        |
        +--com.klg.jclass.util.formulae.Sum
All Implemented Interfaces:
Cloneable, Expression

public class Sum
extends Operation

This is a concrete implementation for the sum "+" operation. A sum can be performed on a pair of elements or across a list.


Field Summary
 
Fields inherited from class com.klg.jclass.util.formulae.Operation
leftOperand, rightOperand
 
Constructor Summary
Sum(com.klg.jclass.util.formulae.Expression operand)
          Sum across the given operand (usually a list of expressions)
Sum(com.klg.jclass.util.formulae.Expression left, com.klg.jclass.util.formulae.Expression right)
          Sum over a pair of Expressions
Sum(com.klg.jclass.util.formulae.Expression left, Number right)
          Sum over an Expression and a Number
Sum(Number left, com.klg.jclass.util.formulae.Expression right)
          Sum over a Number and an Expression
Sum(Number left, Number right)
          Sum of two Numbers
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the result of summing the operands
 
Methods inherited from class com.klg.jclass.util.formulae.Operation
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sum

public Sum(com.klg.jclass.util.formulae.Expression operand)
Sum across the given operand (usually a list of expressions)


Sum

public Sum(com.klg.jclass.util.formulae.Expression left,
           com.klg.jclass.util.formulae.Expression right)
Sum over a pair of Expressions


Sum

public Sum(com.klg.jclass.util.formulae.Expression left,
           Number right)
Sum over an Expression and a Number


Sum

public Sum(Number left,
           com.klg.jclass.util.formulae.Expression right)
Sum over a Number and an Expression


Sum

public Sum(Number left,
           Number right)
Sum of two Numbers

Method Detail

evaluate

public com.klg.jclass.util.formulae.Result evaluate()
Return the result of summing the operands

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The result of this sum on the operands

Copyright © 2004 Quest Software Inc..
All rights reserved.