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
ConstructorsModifierConstructorDescriptionprotectedCollectionNodeIterator(CollectionPointer pointer, boolean reverse, NodePointer startWith) Constructs a new CollectionNodeIterator. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract NodeIteratorgetElementNodeIterator(NodePointer elementPointer) Implemented by subclasses to produce child/attribute node iterators.Gets the NodePointer at the current position.intGets the current iterator position.booleansetPosition(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:NodeIteratorGets the NodePointer at the current position.- Specified by:
getNodePointerin interfaceNodeIterator- Returns:
- NodePointer
-
getPosition
Description copied from interface:NodeIteratorGets the current iterator position.- Specified by:
getPositionin interfaceNodeIterator- Returns:
- int position
-
setPosition
Description copied from interface:NodeIteratorSets the new current position.- Specified by:
setPositionin interfaceNodeIterator- Parameters:
position- the position to set- Returns:
trueif there is a node atposition.
-