public abstract class FunctionNode extends GroupingExpression implements Iterable<GroupingExpression>
GroupingExpression
. Because it operate on other expressions (as opposed
to AggregatorNode
and DocumentValue
that operate on inputs), this expression type can be used at any
input level (see GroupingExpression.resolveLevel(int)
).Modifier and Type | Field and Description |
---|---|
private List<GroupingExpression> |
args |
Modifier | Constructor and Description |
---|---|
protected |
FunctionNode(String image,
List<GroupingExpression> args) |
Modifier and Type | Method and Description |
---|---|
protected static <T> List<T> |
asList(List<T> foo,
List<T> bar) |
protected static <T> List<T> |
asList(T arg1,
T... argN) |
protected static <T> List<T> |
asList(T arg1,
T arg2,
T... argN) |
GroupingExpression |
getArg(int i)
Returns the argument at the given index.
|
int |
getNumArgs()
Returns the number of arguments that were given to this function at construction.
|
Iterator<GroupingExpression> |
iterator() |
void |
resolveLevel(int level)
Resolves the conceptual level of this expression.
|
void |
visit(ExpressionVisitor visitor)
Recursively calls
ExpressionVisitor.visitExpression(GroupingExpression) for this expression and all of
its argument expressions. |
asImage, asString, getLevel, setLabel
getLabel, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
private final List<GroupingExpression> args
protected FunctionNode(String image, List<GroupingExpression> args)
public int getNumArgs()
public GroupingExpression getArg(int i)
i
- The index of the argument to return.IndexOutOfBoundsException
- If the index is out of range.public Iterator<GroupingExpression> iterator()
iterator
in interface Iterable<GroupingExpression>
public void resolveLevel(int level)
GroupingExpression
resolveLevel
in class GroupingExpression
level
- The level of the input data.public void visit(ExpressionVisitor visitor)
GroupingExpression
ExpressionVisitor.visitExpression(GroupingExpression)
for this expression and all of
its argument expressions.visit
in class GroupingExpression
visitor
- The visitor to call.protected static <T> List<T> asList(T arg1, T... argN)
protected static <T> List<T> asList(T arg1, T arg2, T... argN)
Copyright © 2017. All rights reserved.