|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.formulae.Operation
The Operation class defines the basic elements of an operator. All operators have (at least potentially) a left and right operand; this allows the correct ordering to be applied to matrix operations and any other non-commutative operators. NOTE: The issue of cycle detection still needs to be addressed
Field Summary | |
com.klg.jclass.util.formulae.Expression |
leftOperand
The operand on the left side of the operator for binary operations; the only operand for unary operations |
com.klg.jclass.util.formulae.Expression |
rightOperand
The operand on the right side of the operator for binary operations |
Constructor Summary | |
Operation()
Constructor for a generic operator with no operands |
|
Operation(com.klg.jclass.util.formulae.Expression operand)
Constructor for a unary or List operator |
|
Operation(com.klg.jclass.util.formulae.Expression left,
com.klg.jclass.util.formulae.Expression right)
Constructor for a binary operator |
|
Operation(com.klg.jclass.util.formulae.Expression left,
Number right)
Constructor for a binary operator given an Expression and a Number |
|
Operation(Number num)
Constructor for a unary operator taking a Number |
|
Operation(Number left,
com.klg.jclass.util.formulae.Expression right)
Constructor for a binary operator given a Number and an Expression |
|
Operation(Number left,
Number right)
Constructor for a binary operator given a pair of Numbers |
Method Summary | |
Object |
clone()
Return an Expression which is a clone of this Operation (all operands are also cloned) |
abstract com.klg.jclass.util.formulae.Result |
evaluate()
Evaluate the Operation, returning the result. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public com.klg.jclass.util.formulae.Expression leftOperand
public com.klg.jclass.util.formulae.Expression rightOperand
Constructor Detail |
public Operation()
public Operation(com.klg.jclass.util.formulae.Expression operand)
operand
- An Expression to be transformed by a unary or
aggregation operationpublic Operation(Number num)
num
- A Number on which to perform a unary operationpublic Operation(com.klg.jclass.util.formulae.Expression left, com.klg.jclass.util.formulae.Expression right)
left
- The Expression on the left-hand side of the operationright
- The Expression on the right-hand side of the operationpublic Operation(com.klg.jclass.util.formulae.Expression left, Number right)
left
- The Expression on the left-hand side of the operationright
- A Number for the right-hand side of the operationpublic Operation(Number left, com.klg.jclass.util.formulae.Expression right)
left
- A Number for the left-hand side of the operationright
- The Expression on the right-hand side of the operationpublic Operation(Number left, Number right)
left
- A Number for the left-hand side of the operationright
- A Number for the right-hand side of the operationMethod Detail |
public abstract com.klg.jclass.util.formulae.Result evaluate()
evaluate
in interface Expression
public Object clone()
clone
in interface Expression
clone
in class Object
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |