org.grinvin.util
Class IteratorWithoutRemove<T>
java.lang.Object
org.grinvin.util.IteratorWithoutRemove<T>
- Iterator
public class IteratorWithoutRemove<T>
extends java.lang.Object
implements Iterator
Allows the use of an existing iterator in such a way that the remove
operation
throws an UnsupportedOperationException
.
IteratorWithoutRemove(Iterator iterator) - Create a new iterator that is backed by the given iterator of the same type,
but does not allow the user to call its
remove method.
|
IteratorWithoutRemove
public IteratorWithoutRemove(Iterator iterator)
Create a new iterator that is backed by the given iterator of the same type,
but does not allow the user to call its remove
method.
hasNext
public boolean hasNext()
remove
public void remove()