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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddArg(ExpressionNode arg) Adds the given argument to this function.clone()protected final booleanprotected abstract booleangetArg(int i) Returns the argument at the given index.intReturns the number of arguments this function has.inthashCode()protected booleanonCalculate(List<ExpressionNode> args, ResultNode result) protected voidonDeserialize(com.yahoo.vespa.objects.Deserializer buf) protected booleanprotected intprotected voidprotected voidprotected voidonSerialize(com.yahoo.vespa.objects.Serializer buf) voidselectMembers(com.yahoo.vespa.objects.ObjectPredicate predicate, com.yahoo.vespa.objects.ObjectOperation operation) voidvisitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.searchlib.expression.FunctionNode
equalsExpression, getResult, setResultMethods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, prepareMethods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toStringMethods 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:
onExecutein classExpressionNode
-
onPrepare
protected void onPrepare()- Overrides:
onPreparein classExpressionNode
-
onCalculate
-
onPrepareResult
protected void onPrepareResult() -
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassIdin classFunctionNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf) - Overrides:
onSerializein classFunctionNode
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserializein classFunctionNode
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.yahoo.vespa.objects.Identifiable
-
equalsFunction
- Specified by:
equalsFunctionin classFunctionNode
-
equalsMultiArgFunction
-
clone
- Overrides:
clonein classFunctionNode
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) - Overrides:
visitMembersin classFunctionNode
-
selectMembers
public void selectMembers(com.yahoo.vespa.objects.ObjectPredicate predicate, com.yahoo.vespa.objects.ObjectOperation operation) - Overrides:
selectMembersin classcom.yahoo.vespa.objects.Selectable
-