Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util
Class MultiIterator

java.lang.Object
  extended by com.jivesoftware.util.MultiIterator
All Implemented Interfaces:
java.util.Iterator
Direct Known Subclasses:
MultiArticleIterator

public class MultiIterator
extends java.lang.Object
implements java.util.Iterator

A class which iterates over multiple iterators.


Constructor Summary
MultiIterator()
           
 
Method Summary
 void addIterator(java.util.Iterator iter)
          Adds an iterator to the list of iterators.
 boolean hasNext()
          Tests to see whether or not there are more items to return.
 java.lang.Object next()
          Returns the next object in the iterator list.
 void remove()
          Note: not supported in this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiIterator

public MultiIterator()
Method Detail

addIterator

public void addIterator(java.util.Iterator iter)
Adds an iterator to the list of iterators. This is added to the end of the list.

Parameters:
iter - the iterator to add for iteration.

remove

public void remove()
Note: not supported in this class.

Specified by:
remove in interface java.util.Iterator

hasNext

public boolean hasNext()
Tests to see whether or not there are more items to return.

Specified by:
hasNext in interface java.util.Iterator
Returns:
false if there are no more items in any of the iterators to return, true otherwise.

next

public java.lang.Object next()
Returns the next object in the iterator list. Will throw a NoSuchElementException exception if there are no items to return.

Specified by:
next in interface java.util.Iterator
Returns:
the next object in the iterator list.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.