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, removeExpressionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExpressionListener, get, getBoolean, getDouble, getFloat, getInt, getLong, getType, removeExpressionListenerprotected CopyOnWriteArrayList m_params
protected final int m_pcount
protected FunctionExpression(int parameterCount)
parameterCount - the max parameter countpublic abstract java.lang.String getName()
FunctiongetName in interface FunctionFunction.getName()public void addParameter(Expression e)
FunctionaddParameter in interface Functione - the parameter sub-expressionFunction.addParameter(prefuse.data.expression.Expression)protected int paramCount()
protected final Expression param(int idx)
idx - the parameter indexpublic int getParameterCount()
FunctiongetParameterCount in interface FunctionFunction.VARARGS is the number is variable.Function.getParameterCount()protected void missingParams()
public void visit(ExpressionVisitor v)
Expressionvisit in interface Expressionvisit in class AbstractExpressionv - the ExpressionVisitorExpression.visit(prefuse.data.expression.ExpressionVisitor)protected void addChildListeners()
AbstractExpressionaddChildListeners in class AbstractExpressionAbstractExpression.addChildListeners()protected void removeChildListeners()
AbstractExpressionremoveChildListeners in class AbstractExpressionAbstractExpression.removeChildListeners()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()