|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--Operator
|
+--SubtractionOperator
This represents the operator - in an arithmetic equation; as in 3 - 5 = -2.
| Fields inherited from class Operator |
numberOperands,
precedence,
preceededByAnOperand,
token |
| Constructor Summary | |
SubtractionOperator()
Creates an Operator with:
token: -
precedence: 3
numberOperands: 2
preceededByAnOperand: true
|
|
| Method Summary | |
int |
operate(int[] x)
|
| Methods inherited from class Operator |
isHigherPrecedence,
isLowerPrecedence,
toString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public SubtractionOperator()
Operator with:
| Method Detail |
public int operate(int[] x)
x[] - the operands
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||