Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.configuration.tree.xpath
Class ConfigurationNodeIteratorChildren

    java.lang.Object
      org.apache.commons.configuration.tree.xpath.ConfigurationNodeIteratorBase
          org.apache.commons.configuration.tree.xpath.ConfigurationNodeIteratorChildren

All Implemented Interfaces:
  org.apache.commons.jxpath.ri.model.NodeIterator

     class ConfigurationNodeIteratorChildren

extends ConfigurationNodeIteratorBase

A specialized iterator implementation for the child nodes of a configuration node.

Since:
  1.3
Version:
  $Id: ConfigurationNodeIteratorChildren.java 439648 2006-09-02 20:42:10Z oheger $
Author:
  Oliver Heger

Constructor Summary
`ConfigurationNodeIteratorChildren(org.apache.commons.jxpath.ri.model.NodePointer parent, org.apache.commons.jxpath.ri.compiler.NodeTest nodeTest, boolean reverse, org.apache.commons.jxpath.ri.model.NodePointer startsWith)` Creates a new instance of `ConfigurationNodeIteratorChildren` and initializes it.

Method Summary
`protected List` | `createSubNodeList(ConfigurationNode node, org.apache.commons.jxpath.ri.compiler.NodeTest test)` Creates the list with sub nodes.
`protected int` | `findStartIndex(ConfigurationNode node, ConfigurationNode startNode)` Determines the start position of the iteration.

Methods inherited from class org.apache.commons.configuration.tree.xpath.ConfigurationNodeIteratorBase
`createNodePointer, getMaxPosition, getNodePointer, getParent, getPosition, getStartOffset, initSubNodeList, positionToIndex, setPosition, setStartOffset`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConfigurationNodeIteratorChildren

    public ConfigurationNodeIteratorChildren(org.apache.commons.jxpath.ri.model.NodePointer parent,
                                             org.apache.commons.jxpath.ri.compiler.NodeTest nodeTest,
                                             boolean reverse,
                                             org.apache.commons.jxpath.ri.model.NodePointer startsWith)

  Creates a new instance of `ConfigurationNodeIteratorChildren` and initializes it.

  Parameters:
    `parent` - the parent pointer
    `nodeTest` - the test selecting the sub nodes
    `reverse` - the reverse flag
    `startsWith` - the first element of the iteration

Method Detail

### createSubNodeList

    protected List createSubNodeList(ConfigurationNode node,
                                     org.apache.commons.jxpath.ri.compiler.NodeTest test)

  Creates the list with sub nodes. This method gets called during initialization phase. It finds out, based on the given test, which nodes must be iterated over.

  Parameters:
    `node` - the current node
    `test` - the test object
  Returns:
    a list with the matching nodes

### findStartIndex

    protected int findStartIndex(ConfigurationNode node,
                                 ConfigurationNode startNode)

  Determines the start position of the iteration. Finds the index of the given start node in the children of the root node.

  Parameters:
    `node` - the root node
    `startNode` - the start node
  Returns:
    the start node's index

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.