|
||||||||||
| 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
abstract class 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).
| Field Summary | |
|---|---|
private org.apache.commons.jxpath.ri.model.NodePointer |
parent
Stores the parent node pointer. |
private int |
position
Stores the current position. |
private boolean |
reverse
Stores the reverse flag. |
private int |
startOffset
Stores the start offset of the iterator. |
private java.util.List |
subNodes
Stores the list with the sub nodes. |
| 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(java.util.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 |
| Field Detail |
|---|
private org.apache.commons.jxpath.ri.model.NodePointer parent
private java.util.List subNodes
private int position
private int startOffset
private boolean reverse
| Constructor Detail |
|---|
protected ConfigurationNodeIteratorBase(org.apache.commons.jxpath.ri.model.NodePointer parent,
boolean reverse)
ConfigurationNodeIteratorBase
and initializes it.
parent - the parent pointerreverse - the reverse flag| Method Detail |
|---|
public int getPosition()
getPosition in interface org.apache.commons.jxpath.ri.model.NodeIteratorpublic boolean setPosition(int pos)
setPosition in interface org.apache.commons.jxpath.ri.model.NodeIteratorpos - the new position
public org.apache.commons.jxpath.ri.model.NodePointer getNodePointer()
getNodePointer in interface org.apache.commons.jxpath.ri.model.NodeIteratorprotected org.apache.commons.jxpath.ri.model.NodePointer getParent()
protected int getStartOffset()
protected void setStartOffset(int startOffset)
startOffset - the start offsetprotected void initSubNodeList(java.util.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 | |||||||||