edu.wpi.cs.dsrg.xmldb.xat.common.expression
Interface TerminalExpression

All Known Implementing Classes:
TerminalExpressionImp

public interface TerminalExpression
extends Expression

This class defines a arithmatic expression. It's going to represent the leaf expressions, e.g., A String, Double, or a ColumnName. Hits: You can keep an Object property, that maybe objects of String, Double or ColumnName.

Since:
1.0

Field Summary
static int BOOL
           
static int DOUBLE
           
static int NAME
           
static int STRING
          The integer representation of the type of the terminal expression.
 
Method Summary
 int getType()
          Get the type of this terminalExpression.
 java.lang.Object getValue()
          get the value of this expresssion.
 void setType(int type)
          Set the type of this terminal expression.
 void setValue(boolean value)
          Set the boolean value for this terminal expression.
 void setValue(ColumnName value)
          Set the column name value for this terminal expression.
 void setValue(double value)
          Set the double value for this terminal expression.
 void setValue(java.lang.String value)
          Set the string value for this terminal expression.
 
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.expression.Expression
eval, getRelatedColumnNames, toSQL
 

Field Detail

STRING

public static final int STRING
The integer representation of the type of the terminal expression.
Since:
1.0

DOUBLE

public static final int DOUBLE

NAME

public static final int NAME

BOOL

public static final int BOOL
Method Detail

getType

public int getType()
Get the type of this terminalExpression. It could be a String, or a Double, or a ColumnName.
Returns:
int The result got as the type of this terminal expression.
Since:
1.0

getValue

public java.lang.Object getValue()
get the value of this expresssion.
Returns:
java.lang.Object The value of this expression.
Since:
1.0

setType

public void setType(int type)
Set the type of this terminal expression.
Parameters:
type - The type of this expression.
Since:
1.0

setValue

public void setValue(double value)
Set the double value for this terminal expression.
Parameters:
value - The double value of this expression.
Since:
1.0

setValue

public void setValue(ColumnName value)
Set the column name value for this terminal expression.
Parameters:
value - The column name value of this expression.
Since:
1.0

setValue

public void setValue(java.lang.String value)
Set the string value for this terminal expression.
Parameters:
value - The string value of this expression.
Since:
1.0

setValue

public void setValue(boolean value)
Set the boolean value for this terminal expression.
Parameters:
value - The boolean value of this expression.
Since:
1.0