org.crosswire.common.util
Class ItemIterator<T>

java.lang.Object
  extended by org.crosswire.common.util.ItemIterator<T>
Type Parameters:
T - The type of the single element that this iterator will return.
All Implemented Interfaces:
Iterator<T>

public class ItemIterator<T>
extends Object
implements Iterator<T>

An ItemIterator is an Iterator that iterates a single item.

Author:
DM Smith
See Also:
The GNU Lesser General Public License for details.

Field Summary
private  boolean done
           
private  T item
           
 
Constructor Summary
ItemIterator(T item)
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

private T item

done

private boolean done
Constructor Detail

ItemIterator

public ItemIterator(T item)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>

remove

public void remove()
            throws UnsupportedOperationException
Specified by:
remove in interface Iterator<T>
Throws:
UnsupportedOperationException

Copyright ยจ 2003-2015