Package com.google.common.collect
Class UnmodifiableIterator<E extends @Nullable java.lang.Object>
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
- Direct Known Subclasses:
AbstractIterator
,AbstractSequentialIterator
,UnmodifiableListIterator
@GwtCompatible public abstract class UnmodifiableIterator<E extends @Nullable java.lang.Object> extends java.lang.Object implements java.util.Iterator<E>
An iterator that does not supportremove()
.UnmodifiableIterator
is used primarily in conjunction with implementations ofImmutableCollection
, such asImmutableList
. You can, however, convert an existing iterator to anUnmodifiableIterator
usingIterators.unmodifiableIterator(java.util.Iterator<? extends T>)
.- Since:
- 2.0
- Author:
- Jared Levy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UnmodifiableIterator()
Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
remove()
Deprecated.Unsupported operation.
-
-
-
Constructor Detail
-
UnmodifiableIterator
protected UnmodifiableIterator()
Constructor for use by subclasses.
-
-
Method Detail
-
remove
@Deprecated public final void remove()
Deprecated.Unsupported operation.Guaranteed to throw an exception and leave the underlying data unmodified.
-
-