Class ExpressionElement

java.lang.Object
  |
  +--ExpressionElement

public class ExpressionElement
extends java.lang.Object

This class represents an element of an expression. The possible elements which this class may act for a wrapper for are: java.lang.Integer, Variable, Operator, and GroupingSymbol.


Field Summary
static int END
          Identifier for the end of the identifiers
static int GROUPING_SYMBOL
          Identifier for a GroupingSymbol element in the wrapper
static int OPERATOR
          Identifier for a Operator element in the wrapper
static int OTHER
          Identifier for an unknown element in the wrapper
static int START
          Identifier for the beginning of the identifiers
 int type
          Holds one of the identifiers and specifies the type of the object wrapped
static int VALUE
          Identifier for an java.lang.Integer element in the wrapper
static int VARIABLE
          Identifier for a Variable element in the wrapper
 
Constructor Summary
ExpressionElement(java.lang.Object o)
          Sets the contents and establishes the type with a series of instanceof checks
 
Method Summary
 java.lang.String toString()
           
 java.lang.String typeString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START

public static final int START
Identifier for the beginning of the identifiers

VALUE

public static final int VALUE
Identifier for an java.lang.Integer element in the wrapper

VARIABLE

public static final int VARIABLE
Identifier for a Variable element in the wrapper

OPERATOR

public static final int OPERATOR
Identifier for a Operator element in the wrapper

GROUPING_SYMBOL

public static final int GROUPING_SYMBOL
Identifier for a GroupingSymbol element in the wrapper

OTHER

public static final int OTHER
Identifier for an unknown element in the wrapper

END

public static final int END
Identifier for the end of the identifiers

type

public int type
Holds one of the identifiers and specifies the type of the object wrapped
Constructor Detail

ExpressionElement

public ExpressionElement(java.lang.Object o)
Sets the contents and establishes the type with a series of instanceof checks
Parameters:
o - the object to be wrapped may be an Integer, Variable, Operator, or GroupingSymbol.
Method Detail

typeString

public java.lang.String typeString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object