|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExpressionAbstract
FunctionImpl
public class FunctionImpl
Default implementation of a Function; you may extend this class to implement specific functionality.
Field Summary |
---|
Fields inherited from interface Expression |
---|
NIL |
Constructor Summary | |
---|---|
FunctionImpl()
|
Method Summary | |
---|---|
Object |
accept(ExpressionVisitor visitor,
Object extraData)
Subclass should override, default implementation just returns extraData |
Object |
evaluate(Object object)
Default implementation simply returns the fallbackValue. |
Literal |
getFallbackValue()
|
String |
getName()
Gets the name of this function. |
List<Expression> |
getParameters()
Returns the function parameters. |
void |
setFallbackValue(Literal fallbackValue)
|
void |
setName(String name)
Sets the name of the function. |
void |
setParameters(List<Expression> params)
Sets the function parameters. |
Methods inherited from class ExpressionAbstract |
---|
eval, eval, evaluate |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Expression |
---|
evaluate |
Constructor Detail |
---|
public FunctionImpl()
Method Detail |
---|
public String getName()
getName
in interface Function
public void setName(String name)
public List<Expression> getParameters()
getParameters
in interface Function
public Object evaluate(Object object)
Please override this method to produce a value based on the provided arguments.
evaluate
in interface Expression
evaluate
in class ExpressionAbstract
object
- Object being evaluated; often a Feature
public void setParameters(List<Expression> params)
public void setFallbackValue(Literal fallbackValue)
public Literal getFallbackValue()
getFallbackValue
in interface Function
public Object accept(ExpressionVisitor visitor, Object extraData)
ExpressionAbstract
accept
in interface Expression
accept
in class ExpressionAbstract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |