freegraph
Class ExpressionItem.Parenthesis
java.lang.Object
|
+--freegraph.ExpressionItem
|
+--freegraph.ExpressionItem.Parenthesis
- Enclosing class:
- ExpressionItem
- public static class ExpressionItem.Parenthesis
- extends ExpressionItem
A Parenthesis is an ExpressionItem used to hold a
single parenthesis.
|
Field Summary |
static int |
LEFT
indicats Left parenthesis |
static int |
RIGHT
indicats Right parenthesis |
|
Method Summary |
int |
getAction(ExpressionItem exprItem)
If this is a LEFT parenthesis, this is moved to the hold stack; If
it this is a RIGHT the hold stack is moved to the RPN stack, except
if exprItem is a Parenthesis (delete hold stack) or null (error). |
int |
getKind()
returns the kind of parenthesis (LEFT or RIGHT) |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LEFT
public static final int LEFT
- indicats Left parenthesis
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- indicats Right parenthesis
- See Also:
- Constant Field Values
ExpressionItem.Parenthesis
public ExpressionItem.Parenthesis(int kind)
getKind
public int getKind()
- returns the kind of parenthesis (LEFT or RIGHT)
getAction
public int getAction(ExpressionItem exprItem)
- If this is a LEFT parenthesis, this is moved to the hold stack; If
it this is a RIGHT the hold stack is moved to the RPN stack, except
if exprItem is a Parenthesis (delete hold stack) or null (error).
- Specified by:
getAction in class ExpressionItem
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object