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 | Constructor and Description |
---|---|
protected |
FunctionNode(String image,
String label,
Integer level,
List<GroupingExpression> args) |
Modifier and Type | Method and Description |
---|---|
protected List<GroupingExpression> |
args()
Returns the arguments of this as a list which cannot be modified
|
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, copy, getLevel, getLevelOrNull, setLabel
getImage, getLabel, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected FunctionNode(String image, String label, Integer level, 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.protected List<GroupingExpression> args()
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 © 2018. All rights reserved.