public final class UnmodifiableIterator extends java.lang.Object implements java.util.Iterator, Unmodifiable
Modifier and Type | Method and 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.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
Copyright © 2010 - 2020 Adobe. All Rights Reserved