Venice 0.7beta

org.mov.parser.expression
Class TerminalExpression

java.lang.Object
  extended by org.mov.parser.expression.AbstractExpression
      extended by org.mov.parser.expression.TerminalExpression
All Implemented Interfaces:
java.lang.Cloneable, Expression
Direct Known Subclasses:
DayExpression, DayOfWeekExpression, DayOfYearExpression, GetVariableExpression, MonthExpression, NumberExpression, QuoteExpression, StringExpression, YearExpression

public abstract class TerminalExpression
extends AbstractExpression

Abstract base class for all expressions requiring no arguments.


Field Summary
 
Fields inherited from interface org.mov.parser.Expression
BOOLEAN_TYPE, FALSE, FLOAT_QUOTE_TYPE, FLOAT_TYPE, INTEGER_QUOTE_TYPE, INTEGER_TYPE, STRING_TYPE, TRUE, TRUE_LEVEL
 
Constructor Summary
TerminalExpression()
          Create a new terminal expression.
 
Method Summary
 int checkType()
          Perform type checking on the expression.
 int getChildCount()
          Return the number of children required in a terminal expression.
 
Methods inherited from class org.mov.parser.expression.AbstractExpression
clone, equals, getChild, getIndex, getNumberFormat, getParent, hashCode, isRoot, iterator, parseDouble, parseInt, setChild, setParent, simplify, size, size, valueOfDouble, valueOfInt
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mov.parser.Expression
evaluate, getType, toString
 

Constructor Detail

TerminalExpression

public TerminalExpression()
Create a new terminal expression.

Method Detail

getChildCount

public int getChildCount()
Return the number of children required in a terminal expression. This will always evaluate to 0.

Returns:
0

checkType

public int checkType()
              throws TypeMismatchException
Description copied from interface: Expression
Perform type checking on the expression.

Returns:
the return type of the expression
Throws:
TypeMismatchException - if the expression has incorrect types

Venice 0.7beta