Class UnionContext
java.lang.Object
org.apache.commons.jxpath.ri.EvalContext
org.apache.commons.jxpath.ri.axes.NodeSetContext
org.apache.commons.jxpath.ri.axes.UnionContext
- All Implemented Interfaces:
Iterator,ExpressionContext
EvalContext that represents a union between other contexts - result of a union operation like (a | b)
-
Field Summary
Fields inherited from class org.apache.commons.jxpath.ri.EvalContext
parentContext, position, rootContext -
Constructor Summary
ConstructorsConstructorDescriptionUnionContext(EvalContext parentContext, EvalContext[] contexts) Constructs a new UnionContext. -
Method Summary
Modifier and TypeMethodDescriptionintDetermines the document order for this context.booleansetPosition(int position) Moves the current position to the specified index.Methods inherited from class org.apache.commons.jxpath.ri.axes.NodeSetContext
getCurrentNodePointer, getNodeSet, nextNode, nextSetMethods inherited from class org.apache.commons.jxpath.ri.EvalContext
getContextNodeList, getContextNodePointer, getCurrentPosition, getJXPathContext, getPosition, getRootContext, getSingleNodePointer, getValue, hasNext, isChildOrderingRequired, next, remove, reset, sortPointers, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
UnionContext
Constructs a new UnionContext.- Parameters:
parentContext- parent contextcontexts- child contexts
-
-
Method Details
-
getDocumentOrder
Description copied from class:EvalContextDetermines the document order for this context.- Overrides:
getDocumentOrderin classEvalContext- Returns:
- 1 ascending order, -1 descending order, 0 - does not require ordering
-
setPosition
Description copied from class:EvalContextMoves the current position to the specified index. Used with integer predicates to quickly get to the n'th element of the node set. Returns false if the position is out of the node set range. You can call it with 0 as the position argument to restart the iteration.- Overrides:
setPositionin classNodeSetContext- Parameters:
position- to set- Returns:
- boolean
-