java.util.Iterator
public class ReadOnlyIterator extends java.lang.Object implements java.util.Iterator
Constructor | Description |
---|---|
ReadOnlyIterator(java.util.Iterator it) |
Creates a new read-only iterator for the given iterator.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
hasNext() |
Returns true if the iteration has more elements.
|
java.lang.Object |
next() |
Returns the next element in the iteration.
|
void |
remove() |
Throws
UnsupportedOperationException . |
public ReadOnlyIterator(java.util.Iterator it)
it
- the iterator.public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
UnsupportedOperationException
.remove
in interface java.util.Iterator