DefaultDocumentIterator Class

DEPRECATED

com.bea.p13n.content.document.ref
DefaultDocumentIterator Class

public class DefaultDocumentIterator

    extends Object
    implements com.bea.p13n.content.document.spi.DocumentIterator

A wrapper around a iterator or collection which supports a close.


Hierarchy
Object
  DefaultDocumentIterator
All Implemented Interfaces

com.bea.p13n.content.document.spi.DocumentIterator, Iterator

Field Summary

protected Collection
collection
The wrapped collection.
protected Iterator
iterator
The wrapped iterator.
 

Constructor Summary

DefaultDocumentIterator(Collection collection, Iterator iterator)

Constructor from a collection and iterator.
DefaultDocumentIterator(Collection collection)

Constructor from an collection.
DefaultDocumentIterator(Iterator iterator)

Constructor from an iterator.
 

Method Summary

public synchronized void
close()
Close this iterator.
public boolean
hasNext()
Tell if there is another item in the iteration.
public Object
next()
Get the next item in the iteration.
public void
remove()
Remove the last returned object from the iterator's collection.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.p13n.content.document.spi.com.bea.p13n.content.document.spi.DocumentIterator
close
 
Methods from interface java.util.Iterator
hasNext, next, remove
 

Field Detail

collection

protected Collection collection
The wrapped collection.

This will be cleared upon a close().


iterator

protected Iterator iterator
The wrapped iterator.

 

Constructor Detail

DefaultDocumentIterator

public DefaultDocumentIterator(Collection collection, 
                               Iterator iterator)
Constructor from a collection and iterator.

DefaultDocumentIterator

public DefaultDocumentIterator(Collection collection)
Constructor from an collection.

DefaultDocumentIterator

public DefaultDocumentIterator(Iterator iterator)
Constructor from an iterator.
 

Method Detail

close() Method

public synchronized void close()
Close this iterator.


hasNext() Method

public boolean hasNext()
Tell if there is another item in the iteration.


next() Method

public Object next()
Get the next item in the iteration.


remove() Method

public void remove()
Remove the last returned object from the iterator's collection.