net.cscott.jutil
public abstract class UnmodifiableIterator<E> extends Object implements Iterator<E>
UnmodifiableIterator
is an abstract superclass to save
you the trouble of implementing the remove()
method
over and over again for those iterators which don't implement it.
The name's a bit clunky, but fits with the JDK naming in
java.util.Collections
and etc.
Version: $Id: UnmodifiableIterator.java,v 1.1 2003/03/20 01:58:20 cananian Exp $
Method Summary | |
---|---|
abstract boolean | hasNext() Returns true if the iteration has more elements. |
abstract E | next() Returns the next element in the iteration. |
void | remove() Always throws an UnsupportedOperationException . |
true
if the iteration has more elements.Returns: true
if the iterator has more elements.
Throws: java.util.NoSuchElementException iteration has no more elements.
UnsupportedOperationException
.Throws: UnsupportedOperationException always.