public abstract class FunctionExpression extends AbstractExpression implements Function
Modifier and Type | Field and Description |
---|---|
protected CopyOnWriteArrayList |
m_params |
protected int |
m_pcount |
Modifier | Constructor and Description |
---|---|
protected |
FunctionExpression(int parameterCount)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addChildListeners()
Add child listeners to catch and propagate sub-expression updates.
|
void |
addParameter(Expression e)
Add a parameter value sub-expression to this function.
|
abstract java.lang.String |
getName()
Get the name of this function.
|
int |
getParameterCount()
Get the maximum number of parameters accepted by this Function.
|
protected void |
missingParams()
Throw an exception when needed parameters are missing.
|
protected Expression |
param(int idx)
Return the parameter expression at the given index.
|
protected int |
paramCount()
An internal-only method that returns the current number of
parameters collected.
|
protected void |
removeChildListeners()
Remove child listeners for sub-expression updates.
|
java.lang.String |
toString() |
void |
visit(ExpressionVisitor v)
Passes the visitor through this expression and any sub expressions
|
addExpressionListener, expressionChanged, fireExpressionChange, get, getBoolean, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addExpressionListener, get, getBoolean, getDouble, getFloat, getInt, getLong, getType, removeExpressionListener
protected CopyOnWriteArrayList m_params
protected final int m_pcount
protected FunctionExpression(int parameterCount)
parameterCount
- the max parameter countpublic abstract java.lang.String getName()
Function
getName
in interface Function
Function.getName()
public void addParameter(Expression e)
Function
addParameter
in interface Function
e
- the parameter sub-expressionFunction.addParameter(prefuse.data.expression.Expression)
protected int paramCount()
protected final Expression param(int idx)
idx
- the parameter indexpublic int getParameterCount()
Function
getParameterCount
in interface Function
Function.VARARGS
is the number is variable.Function.getParameterCount()
protected void missingParams()
public void visit(ExpressionVisitor v)
Expression
visit
in interface Expression
visit
in class AbstractExpression
v
- the ExpressionVisitorExpression.visit(prefuse.data.expression.ExpressionVisitor)
protected void addChildListeners()
AbstractExpression
addChildListeners
in class AbstractExpression
AbstractExpression.addChildListeners()
protected void removeChildListeners()
AbstractExpression
removeChildListeners
in class AbstractExpression
AbstractExpression.removeChildListeners()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Copyright ? 2013 Regents of the University of California