|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infix2postfix.Operator
This object represents any operator in the expression. An operator must have a symbol (e.g. '+') and priority number (e.g. 1).
Field Summary | |
protected int |
priority
Priority number associated with this operator |
protected java.lang.String |
symbol
Symbol to represent this operator |
Constructor Summary | |
Operator(java.lang.String symbol,
int priority)
Constructor accepting symbol and priority |
Method Summary | |
boolean |
equals(java.lang.Object o)
Equates two operators. |
int |
getPriority()
Returns priority associated with this operator. |
java.lang.String |
getSymbol()
Returns symbol associated with this operator. |
int |
hashCode()
Defines hashcode for this operator. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String symbol
protected int priority
Constructor Detail |
public Operator(java.lang.String symbol, int priority)
Method Detail |
public java.lang.String getSymbol()
public int getPriority()
public boolean equals(java.lang.Object o)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |