Venice 0.751beta

nz.org.venice.parser.expression
Class TernaryExpression

java.lang.Object
  extended bynz.org.venice.parser.expression.AbstractExpression
      extended bynz.org.venice.parser.expression.TernaryExpression
All Implemented Interfaces:
java.lang.Cloneable, Expression
Direct Known Subclasses:
AvgExpression, BBLExpression, BBUExpression, IfExpression, MaxExpression, MinExpression, MomentumExpression, OBVExpression, StandardDeviationExpression, SumExpression, TrendExpression

public abstract class TernaryExpression
extends AbstractExpression

Abstract base class for all expressions requiring three arguments.


Field Summary
 
Fields inherited from interface nz.org.venice.parser.Expression
BOOLEAN_TYPE, FALSE, FLOAT_QUOTE_TYPE, FLOAT_TYPE, INTEGER_QUOTE_TYPE, INTEGER_SHORT_TYPE, INTEGER_TYPE, NUMERIC_TYPE, STRING_TYPE, TRUE, TRUE_LEVEL, UNDEFINED_TYPE
 
Constructor Summary
TernaryExpression(Expression arg1, Expression arg2, Expression arg3)
          Create a new ternary expression with the given three arguments.
 
Method Summary
 int getChildCount()
          Return the number of children required in a ternary expression.
 
Methods inherited from class nz.org.venice.parser.expression.AbstractExpression
clone, equals, getChild, getId, getIndex, getNumberFormat, getParent, getParseMetadata, hashCode, isRoot, iterator, parseDouble, parseInt, printParents, setChild, setChildMutableVersion, setParent, setParseMetadata, simplify, simplifyMutableVersion, size, size, toString, validTree, valueOfDouble, valueOfInt
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nz.org.venice.parser.Expression
checkType, evaluate, getType
 

Constructor Detail

TernaryExpression

public TernaryExpression(Expression arg1,
                         Expression arg2,
                         Expression arg3)
Create a new ternary expression with the given three arguments.

Parameters:
arg1 - the first argument
arg2 - the second argument
arg3 - the third argument
Method Detail

getChildCount

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

Returns:
3

Venice 0.751beta