Package com.yahoo.searchlib.expression
Class MultiArgFunctionNode
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.expression.ExpressionNode
com.yahoo.searchlib.expression.FunctionNode
com.yahoo.searchlib.expression.MultiArgFunctionNode
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
CatFunctionNode
,MathFunctionNode
,NumericFunctionNode
,StrCatFunctionNode
,UnaryFunctionNode
This is an abstract super-class for all functions that accepts multiple arguments. This node implements the necessary API for manipulating arguments.
- Author:
- baldersheim, Simon Thoresen Hult
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddArg
(ExpressionNode arg) Adds the given argument to this function.clone()
protected final boolean
protected abstract boolean
getArg
(int i) Returns the argument at the given index.int
Returns the number of arguments this function has.int
hashCode()
protected boolean
onCalculate
(List<ExpressionNode> args, ResultNode result) protected void
onDeserialize
(com.yahoo.vespa.objects.Deserializer buf) protected boolean
protected int
protected void
protected void
protected void
onSerialize
(com.yahoo.vespa.objects.Serializer buf) void
selectMembers
(com.yahoo.vespa.objects.ObjectPredicate predicate, com.yahoo.vespa.objects.ObjectOperation operation) void
visitMembers
(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.searchlib.expression.FunctionNode
equalsExpression, getResult, setResult
Methods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, prepare
Methods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId, toString
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
MultiArgFunctionNode
public MultiArgFunctionNode()
-
-
Method Details
-
addArg
Adds the given argument to this function.
- Parameters:
arg
- The argument to add.- Returns:
- This, to allow chaining.
-
getArg
Returns the argument at the given index.
- Parameters:
i
- The index of the argument to return.- Returns:
- The argument.
-
getNumArgs
public int getNumArgs()Returns the number of arguments this function has.
- Returns:
- The size of the argument list.
-
onExecute
protected boolean onExecute()- Overrides:
onExecute
in classExpressionNode
-
onPrepare
protected void onPrepare()- Overrides:
onPrepare
in classExpressionNode
-
onCalculate
-
onPrepareResult
protected void onPrepareResult() -
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassId
in classFunctionNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf) - Overrides:
onSerialize
in classFunctionNode
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserialize
in classFunctionNode
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
equalsFunction
- Specified by:
equalsFunction
in classFunctionNode
-
equalsMultiArgFunction
-
clone
- Overrides:
clone
in classFunctionNode
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) - Overrides:
visitMembers
in classFunctionNode
-
selectMembers
public void selectMembers(com.yahoo.vespa.objects.ObjectPredicate predicate, com.yahoo.vespa.objects.ObjectOperation operation) - Overrides:
selectMembers
in classcom.yahoo.vespa.objects.Selectable
-