org.oXML.xpath.iterator
Class AbstractNodeset

java.lang.Object
  extended byorg.oXML.xpath.iterator.AbstractNodeset
All Implemented Interfaces:
Nodeset
Direct Known Subclasses:
IteratedNodeset

public abstract class AbstractNodeset
extends java.lang.Object
implements Nodeset


Nested Class Summary
 class AbstractNodeset.AbstractNodesetIterator
           
 
Field Summary
 
Fields inherited from interface org.oXML.type.Nodeset
EMPTY_SET
 
Constructor Summary
AbstractNodeset(NodeIterator iterator)
          create a nodeset driven by this iterator
 
Method Summary
 void addNode(Node node)
           
 boolean contains(Node node)
           
 NodeIterator getIterator()
           
 Node getNode(int index)
          position the nodeset at the given index and return the indexed node
 int indexOf(Node node)
           
 void insertNode(int pos, Node node)
           
 boolean isEmpty()
           
protected  Node nextNode()
          step forward using the iterator and save the result node
 void removeNode(int pos)
           
 int size()
          get the cardinality of this nodeset
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractNodeset

public AbstractNodeset(NodeIterator iterator)
create a nodeset driven by this iterator

Method Detail

nextNode

protected Node nextNode()
step forward using the iterator and save the result node


getIterator

public NodeIterator getIterator()
Specified by:
getIterator in interface Nodeset

size

public int size()
Description copied from interface: Nodeset
get the cardinality of this nodeset

Specified by:
size in interface Nodeset

getNode

public Node getNode(int index)
position the nodeset at the given index and return the indexed node

Specified by:
getNode in interface Nodeset
Parameters:
index - position of node in nodeset, starting at 0

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Nodeset

contains

public boolean contains(Node node)

indexOf

public int indexOf(Node node)
Specified by:
indexOf in interface Nodeset

addNode

public void addNode(Node node)
Specified by:
addNode in interface Nodeset

removeNode

public void removeNode(int pos)
Specified by:
removeNode in interface Nodeset

insertNode

public void insertNode(int pos,
                       Node node)
Specified by:
insertNode in interface Nodeset

toString

public java.lang.String toString()