public class ForAxis extends AbsAxis
IAxis that handles a for expression.
This Axis represents only the single-variable for expression. A multiple variables for expression is created by wrap for-Axes by first expanding the expression to a set of nested for expressions, each of which uses only one variable. For example, the expression for $x in X, $y in Y return $x + $y is expanded to for $x in X return for $y in Y return $x + $y.
In a single-variable for expression, the variable is called the range variable, the value of the expression that follows the 'in' keyword is called the binding sequence, and the expression that follows the 'return' keyword is called the return expression. The result of the for expression is obtained by evaluating the return expression once for each item in the binding sequence, with the range variable bound to that item. The resulting sequences are concatenated (as if by the comma operator) in the order of the items in the binding sequence from which they were derived.
Constructor and Description |
---|
ForAxis(AbsAxis range,
AbsAxis returnExpr,
INodeReadTrx pRtx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
void |
reset(long mNodeKey)
Resetting the nodekey of this axis to a given nodekey.
|
addAtomicToItemList, close, getItemList, getNode, getStartKey, isSelfIncluded, iterator, moveTo, next, remove, resetToLastKey, resetToStartKey
public ForAxis(AbsAxis range, AbsAxis returnExpr, INodeReadTrx pRtx)
range
- the range variable that holds the binding sequencereturnExpr
- the return expression of the for expressionCopyright © 2013. All Rights Reserved.