|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections4.iterators.UnmodifiableIterator<E>
public final class UnmodifiableIterator<E>
Decorates an iterator such that it cannot be modified.
Attempts to modify it will result in an UnsupportedOperationException.
| Method Summary | ||
|---|---|---|
boolean |
hasNext()
|
|
E |
next()
|
|
void |
remove()
|
|
static
|
unmodifiableIterator(Iterator<E> iterator)
Decorates the specified iterator such that it cannot be modified. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <E> Iterator<E> unmodifiableIterator(Iterator<E> iterator)
If the iterator is already unmodifiable it is returned directly.
E - the element typeiterator - the iterator to decorate
IllegalArgumentException - if the iterator is nullpublic boolean hasNext()
hasNext in interface Iterator<E>public E next()
next in interface Iterator<E>public void remove()
remove in interface Iterator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||