|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.tree.xpath.ConfigurationNodeIteratorBase
A base class for implementing iterators over configuration nodes.
This class already provides common functionality for implementing the iteration process. Derived classes will implement specific behavior based on the concrete node type (child node or attribute node).
Constructor Summary | |
protected |
ConfigurationNodeIteratorBase(org.apache.commons.jxpath.ri.model.NodePointer parent,
boolean reverse)
Creates a new instance of ConfigurationNodeIteratorBase
and initializes it. |
Method Summary | |
protected org.apache.commons.jxpath.ri.model.NodePointer |
createNodePointer(ConfigurationNode node)
Creates the configuration node pointer for the current position. |
protected int |
getMaxPosition()
Returns the maximum position for this iterator. |
org.apache.commons.jxpath.ri.model.NodePointer |
getNodePointer()
Returns the current node pointer. |
protected org.apache.commons.jxpath.ri.model.NodePointer |
getParent()
Returns the parent node pointer. |
int |
getPosition()
Returns the position of the iteration. |
protected int |
getStartOffset()
Returns the start offset of the iteration. |
protected void |
initSubNodeList(List nodes)
Initializes the list of sub nodes for the iteration. |
protected int |
positionToIndex(int pos)
Returns the index in the data list for the given position. |
boolean |
setPosition(int pos)
Sets the position of the iteration. |
protected void |
setStartOffset(int startOffset)
Sets the start offset of the iteration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ConfigurationNodeIteratorBase(org.apache.commons.jxpath.ri.model.NodePointer parent, boolean reverse)
ConfigurationNodeIteratorBase
and initializes it.
parent
- the parent pointerreverse
- the reverse flagMethod Detail |
public int getPosition()
getPosition
in interface org.apache.commons.jxpath.ri.model.NodeIterator
public boolean setPosition(int pos)
setPosition
in interface org.apache.commons.jxpath.ri.model.NodeIterator
pos
- the new position
public org.apache.commons.jxpath.ri.model.NodePointer getNodePointer()
getNodePointer
in interface org.apache.commons.jxpath.ri.model.NodeIterator
protected org.apache.commons.jxpath.ri.model.NodePointer getParent()
protected int getStartOffset()
protected void setStartOffset(int startOffset)
startOffset
- the start offsetprotected void initSubNodeList(List nodes)
nodes
- the list with the sub nodesprotected int getMaxPosition()
protected org.apache.commons.jxpath.ri.model.NodePointer createNodePointer(ConfigurationNode node)
getNodePointer()
. Derived classes
must create the correct pointer object.
node
- the current configuration node
protected int positionToIndex(int pos)
pos
- the position (1-based)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |