Class CollectionNodeIterator
java.lang.Object
org.apache.commons.jxpath.ri.model.beans.CollectionNodeIterator
- All Implemented Interfaces:
NodeIterator
- Direct Known Subclasses:
CollectionAttributeNodeIterator
,CollectionChildNodeIterator
Combines node iterators of all elements of a collection into one aggregate node iterator.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CollectionNodeIterator
(CollectionPointer pointer, boolean reverse, NodePointer startWith) Constructs a new CollectionNodeIterator. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract NodeIterator
getElementNodeIterator
(NodePointer elementPointer) Implemented by subclasses to produce child/attribute node iterators.Gets the NodePointer at the current position.int
Gets the current iterator position.boolean
setPosition
(int position) Sets the new current position.
-
Constructor Details
-
CollectionNodeIterator
Constructs a new CollectionNodeIterator.- Parameters:
pointer
- collection pointerreverse
- iteration orderstartWith
- starting pointer
-
-
Method Details
-
getElementNodeIterator
Implemented by subclasses to produce child/attribute node iterators.- Parameters:
elementPointer
- owning pointer- Returns:
- NodeIterator
-
getNodePointer
Description copied from interface:NodeIterator
Gets the NodePointer at the current position.- Specified by:
getNodePointer
in interfaceNodeIterator
- Returns:
- NodePointer
-
getPosition
Description copied from interface:NodeIterator
Gets the current iterator position.- Specified by:
getPosition
in interfaceNodeIterator
- Returns:
- int position
-
setPosition
Description copied from interface:NodeIterator
Sets the new current position.- Specified by:
setPosition
in interfaceNodeIterator
- Parameters:
position
- the position to set- Returns:
true
if there is a node atposition
.
-