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.


Nested Class Summary
 
Nested classes inherited from class freegraph.ExpressionItem
ExpressionItem.BiOperator, ExpressionItem.Number, ExpressionItem.Parenthesis, ExpressionItem.UnOperator, ExpressionItem.Variable
 
Field Summary
static int LEFT
          indicats Left parenthesis
static int RIGHT
          indicats Right parenthesis
 
Constructor Summary
ExpressionItem.Parenthesis(int kind)
           
 
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
 

Field Detail

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
Constructor Detail

ExpressionItem.Parenthesis

public ExpressionItem.Parenthesis(int kind)
Method Detail

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