Class FunctionNode

    • Constructor Detail

      • FunctionNode

        protected FunctionNode​(java.lang.String image,
                               java.lang.String label,
                               java.lang.Integer level,
                               java.util.List<GroupingExpression> args)
    • Method Detail

      • getNumArgs

        public int getNumArgs()
        Returns the number of arguments that were given to this function at construction.
        Returns:
        The argument count.
      • getArg

        public GroupingExpression getArg​(int i)
        Returns the argument at the given index.
        Parameters:
        i - The index of the argument to return.
        Returns:
        The argument at the given index.
        Throws:
        java.lang.IndexOutOfBoundsException - If the index is out of range.
      • args

        protected java.util.List<GroupingExpression> args()
        Returns the arguments of this as a list which cannot be modified
      • resolveLevel

        public void resolveLevel​(int level)
        Description copied from class: GroupingExpression
        Resolves the conceptual level of this expression. This level represents the type of data that is consumed by this expression, where level 0 is a single hit, level 1 is a group, level 2 is a list of groups, and so forth. This method verifies the input level against the expression type, and recursively resolves the level of all argument expressions.
        Overrides:
        resolveLevel in class GroupingExpression
        Parameters:
        level - The level of the input data.
      • asList

        protected static <T> java.util.List<T> asList​(T arg1,
                                                      T... argN)
      • asList

        protected static <T> java.util.List<T> asList​(T arg1,
                                                      T arg2,
                                                      T... argN)
      • asList

        protected static <T> java.util.List<T> asList​(java.util.List<T> foo,
                                                      java.util.List<T> bar)