- java.lang.Object
-
- org.arakhne.afc.util.UnmodifiableIterator<M>
-
- Type Parameters:
M
- is the type of element.
- All Implemented Interfaces:
Iterator<M>
public class UnmodifiableIterator<M> extends Object implements Iterator<M>
Class that make unmodifiable an iterator.This class provides features closed to
Collections.unmodifiableCollection(java.util.Collection)
but on iterators.This iterator disables the use of the function
Iterator.remove()
. This iterator implementation is not a sized iterator; seeUnmodifiableSizedIterator
instead.- Version:
- 17.0 2020-01-04 14:41:38
- Author:
- Stéphane GALLAND
- See Also:
UnmodifiableSizedIterator
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- util
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableIterator(Iterable<M> iterable)
Construct an iterator.UnmodifiableIterator(Iterator<M> iterator)
Construct an iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
M
next()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-