Class MultiArgFunctionNode

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
CatFunctionNode, MathFunctionNode, NumericFunctionNode, StrCatFunctionNode, UnaryFunctionNode

public abstract class MultiArgFunctionNode extends FunctionNode

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 Details

    • classId

      public static final int classId
  • Constructor Details

    • MultiArgFunctionNode

      public MultiArgFunctionNode()
  • Method Details

    • addArg

      public MultiArgFunctionNode addArg(ExpressionNode arg)

      Adds the given argument to this function.

      Parameters:
      arg - The argument to add.
      Returns:
      This, to allow chaining.
    • getArg

      public ExpressionNode getArg(int i)

      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 class ExpressionNode
    • onPrepare

      protected void onPrepare()
      Overrides:
      onPrepare in class ExpressionNode
    • onCalculate

      protected boolean onCalculate(List<ExpressionNode> args, ResultNode result)
    • onPrepareResult

      protected void onPrepareResult()
    • onGetClassId

      protected int onGetClassId()
      Overrides:
      onGetClassId in class FunctionNode
    • onSerialize

      protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
      Overrides:
      onSerialize in class FunctionNode
    • onDeserialize

      protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
      Overrides:
      onDeserialize in class FunctionNode
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.yahoo.vespa.objects.Identifiable
    • equalsFunction

      protected final boolean equalsFunction(FunctionNode obj)
      Specified by:
      equalsFunction in class FunctionNode
    • equalsMultiArgFunction

      protected abstract boolean equalsMultiArgFunction(MultiArgFunctionNode obj)
    • clone

      public MultiArgFunctionNode clone()
      Overrides:
      clone in class FunctionNode
    • visitMembers

      public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
      Overrides:
      visitMembers in class FunctionNode
    • selectMembers

      public void selectMembers(com.yahoo.vespa.objects.ObjectPredicate predicate, com.yahoo.vespa.objects.ObjectOperation operation)
      Overrides:
      selectMembers in class com.yahoo.vespa.objects.Selectable