E
- is the templated type of the elements to iterate.public class ReadOnlyIterator<E> extends Object implements Iterator<E>
Iterator
interface that gives a read-only view on an existing
Iterator
instance. Iterator
would extend Enumeration
the world
could be so simple.Modifier and Type | Field and Description |
---|---|
private Iterator<E> |
delegate
the actual iterator instance
|
Constructor and Description |
---|
ReadOnlyIterator(Iterator<E> iterator)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
E |
next() |
void |
remove()
This method will always throw an exception.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public void remove() throws UnsupportedOperationException
remove
in interface Iterator<E>
UnsupportedOperationException
- whenever this method is called.Iterator.remove()
Copyright © 2001–2016 mmm-Team. All rights reserved.