|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.magicproject.operation.Operation
net.sf.magicproject.operation.BinaryOperation
net.sf.magicproject.operation.Add
public final class Add
Reprsents the PLUS operation. This operation is optimzed since it is not executed is is useless.
| Method Summary | |
|---|---|
static Operation |
getInstance()
Return the unique instance of this operation. |
java.lang.String |
getOperator()
Return operator name |
boolean |
isUselessWith(int leftValue,
int rightValue)
Is this operation is useless or not |
int |
process(int leftValue,
int rightValue)
Process a binary operation with two values and return the result. |
| Methods inherited from class net.sf.magicproject.operation.BinaryOperation |
|---|
readNextExpression |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int process(int leftValue,
int rightValue)
Operation
process in class BinaryOperationleftValue - the left value of binary operationrightValue - the right value of binary operation
public boolean isUselessWith(int leftValue,
int rightValue)
Operation
isUselessWith in class OperationleftValue - the left valuerightValue - the right value
public java.lang.String getOperator()
Operation
getOperator in class BinaryOperationpublic static Operation getInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||