Venice 0.751beta

nz.org.venice.parser.expression
Class UnaryExpression

java.lang.Object
  extended bynz.org.venice.parser.expression.AbstractExpression
      extended bynz.org.venice.parser.expression.UnaryExpression
All Implemented Interfaces:
java.lang.Cloneable, Expression
Direct Known Subclasses:
AbsExpression, AlertExpression, CeilExpression, CosineExpression, DefineVariableExpression, EvalFunctionExpression, ExponentialExpression, FloorExpression, LogarithmExpression, LoggingExpression, NotExpression, QuoteSymbolExpression, RandomWithSeedExpression, SetVariableExpression, SineExpression, SqrtExpression

public abstract class UnaryExpression
extends AbstractExpression

Abstract base class for all expressions requiring a single argument.


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
UnaryExpression(Expression sub)
          Create a new unary expression with the given argument.
 
Method Summary
 int getChildCount()
          Return the number of children required in a unary 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

UnaryExpression

public UnaryExpression(Expression sub)
Create a new unary expression with the given argument.

Parameters:
sub - the sub argument
Method Detail

getChildCount

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

Returns:
1

Venice 0.751beta