Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.jxpath.ri.model.beans
Class CollectionNodeIterator  view CollectionNodeIterator download CollectionNodeIterator.java

java.lang.Object
  extended byorg.apache.commons.jxpath.ri.model.beans.CollectionNodeIterator
All Implemented Interfaces:
org.apache.commons.jxpath.ri.model.NodeIterator
Direct Known Subclasses:
CollectionAttributeNodeIterator, CollectionChildNodeIterator

public abstract class CollectionNodeIterator
extends java.lang.Object
implements org.apache.commons.jxpath.ri.model.NodeIterator

Combines node iterators of all elements of a collection into one aggregate node iterator.

Version:
$Revision: 1.3 $ $Date: 2004/02/29 14:17:41 $

Field Summary
private  java.util.List collection
           
private  CollectionPointer pointer
           
private  int position
           
private  boolean reverse
           
private  org.apache.commons.jxpath.ri.model.NodePointer startWith
           
 
Constructor Summary
protected CollectionNodeIterator(CollectionPointer pointer, boolean reverse, org.apache.commons.jxpath.ri.model.NodePointer startWith)
           
 
Method Summary
protected abstract  org.apache.commons.jxpath.ri.model.NodeIterator getElementNodeIterator(org.apache.commons.jxpath.ri.model.NodePointer elementPointer)
          Implemened by subclasses to produce child/attribute node iterators.
 org.apache.commons.jxpath.ri.model.NodePointer getNodePointer()
           
 int getPosition()
           
private  void prepare()
           
 boolean setPosition(int position)
          Sets the new current position and returns true if there a node at that position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pointer

private CollectionPointer pointer

reverse

private boolean reverse

startWith

private org.apache.commons.jxpath.ri.model.NodePointer startWith

position

private int position

collection

private java.util.List collection
Constructor Detail

CollectionNodeIterator

protected CollectionNodeIterator(CollectionPointer pointer,
                                 boolean reverse,
                                 org.apache.commons.jxpath.ri.model.NodePointer startWith)
Method Detail

getElementNodeIterator

protected abstract org.apache.commons.jxpath.ri.model.NodeIterator getElementNodeIterator(org.apache.commons.jxpath.ri.model.NodePointer elementPointer)
Implemened by subclasses to produce child/attribute node iterators.


getPosition

public int getPosition()
Specified by:
getPosition in interface org.apache.commons.jxpath.ri.model.NodeIterator

setPosition

public boolean setPosition(int position)
Description copied from interface: org.apache.commons.jxpath.ri.model.NodeIterator
Sets the new current position and returns true if there a node at that position.

Specified by:
setPosition in interface org.apache.commons.jxpath.ri.model.NodeIterator

getNodePointer

public org.apache.commons.jxpath.ri.model.NodePointer getNodePointer()
Specified by:
getNodePointer in interface org.apache.commons.jxpath.ri.model.NodeIterator

prepare

private void prepare()