JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Add

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

public class Add
extends Operation

This is a concrete implementation for the addition "+" operation. Addition is normally the sum of a pair of elements (unary identity), *???but it can also be between two lists???*.


Field Summary
 
Fields inherited from class com.klg.jclass.util.formulae.Operation
leftOperand, rightOperand
 
Constructor Summary
Add(com.klg.jclass.util.formulae.Expression left, com.klg.jclass.util.formulae.Expression right)
          Create an operation to add two Expressions
Add(com.klg.jclass.util.formulae.Expression left, Number right)
          Create an operation to add an Expression and a Number
Add(Number left, com.klg.jclass.util.formulae.Expression right)
          Create an operation to add a Number and an Expression
Add(Number left, Number right)
          Create an operation to add two Numbers
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the result of adding 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

Add

public Add(com.klg.jclass.util.formulae.Expression left,
           com.klg.jclass.util.formulae.Expression right)
Create an operation to add two Expressions


Add

public Add(com.klg.jclass.util.formulae.Expression left,
           Number right)
Create an operation to add an Expression and a Number


Add

public Add(Number left,
           com.klg.jclass.util.formulae.Expression right)
Create an operation to add a Number and an Expression


Add

public Add(Number left,
           Number right)
Create an operation to add two Numbers

Method Detail

evaluate

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

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The result of the first operand plus the second

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