java.util.Iterator, Unmodifiablepublic final class UnmodifiableIterator extends java.lang.Object implements java.util.Iterator, Unmodifiable
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.Iterator |
decorate(java.util.Iterator iterator) |
Decorates the specified iterator such that it cannot be modified.
|
boolean |
hasNext() |
|
java.lang.Object |
next() |
|
void |
remove() |
public static java.util.Iterator decorate(java.util.Iterator iterator)
If the iterator is already unmodifiable it is returned directly.
iterator - the iterator to decoratejava.lang.IllegalArgumentException - if the iterator is nullpublic boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.IteratorCopyright © 2001-2018 Apache Software Foundation. All Rights Reserved.