Class CGINIterator
- java.lang.Object
-
- CGINIterator
-
- All Implemented Interfaces:
org.apache.commons.jxpath.ri.model.NodeIterator
- Direct Known Subclasses:
AbstractArrayIterator
,AbstractFieldsObjectIterator
,EnumIterator
,NamedIntegerIterator
public abstract class CGINIterator extends Object implements org.apache.commons.jxpath.ri.model.NodeIterator
Abstract superclass of all CGIN NodeIterators.
-
-
Field Summary
Fields Modifier and Type Field Description protected CGINPointer[]
children
Array of pointers to nodes that passed the NodeTest.protected int
position
Current position.
-
Constructor Summary
Constructors Constructor Description CGINIterator()
Subclasses are responsible for initialising the fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CGINPointer
getNodePointer()
Gets pointer to node at current position.int
getPosition()
Gets the current position.boolean
setPosition(int position)
Sets the current position.
-
-
-
Field Detail
-
children
protected CGINPointer[] children
Array of pointers to nodes that passed the NodeTest.
-
position
protected int position
Current position. Positions are counted from 1.
-
-
Method Detail
-
getNodePointer
public CGINPointer getNodePointer()
Gets pointer to node at current position.- Specified by:
getNodePointer
in interfaceorg.apache.commons.jxpath.ri.model.NodeIterator
- Returns:
- CGINPointer
-
getPosition
public int getPosition()
Gets the current position. Positions are counted from 1.- Specified by:
getPosition
in interfaceorg.apache.commons.jxpath.ri.model.NodeIterator
- Returns:
- int
-
setPosition
public boolean setPosition(int position)
Sets the current position. Positions are counted from 1.- Specified by:
setPosition
in interfaceorg.apache.commons.jxpath.ri.model.NodeIterator
- Parameters:
position
- new position- Returns:
- whether the new position is within range to refer to a node to be visited
-
-