@GwtCompatible public abstract class UnmodifiableIterator<E> extends Object implements Iterator<E>
An iterator that does not support remove().
UnmodifiableIterator is used primarily in conjunction with implementations of ImmutableCollection, such as ImmutableList. You can, however, convert an existing iterator to an UnmodifiableIterator using Iterators.unmodifiableIterator(java.util.Iterator<T>).
| Modifier | Constructor and Description |
|---|---|
protected |
UnmodifiableIterator()
Constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
void |
remove()
Deprecated.
Unsupported operation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, hasNext, nextprotected UnmodifiableIterator()
Constructor for use by subclasses.
@Deprecated public final void remove()
Guaranteed to throw an exception and leave the underlying data unmodified.
remove in interface Iterator<E>UnsupportedOperationException - always