E
- the type of elements in this iteratorpublic abstract class ProxiedIterator<E> extends Object implements Iterator<E>
Iterator
implementation pointing to a given iterator.Constructor and Description |
---|
ProxiedIterator(Iterator<E> iterator)
Creates a new
ProxiedIterator instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
protected Iterator<E> |
getProxiedForRead()
Returns the wrapped iterator without verifying if modifying the underlying
collection is prohibited.
|
protected Iterator<E> |
getProxiedIfModifiable()
Verifies if the underlying collection is modifiable and either returns the
wrapped iterator or throws an appropriate exception.
|
int |
hashCode() |
boolean |
hasNext() |
boolean |
isModifiable()
Flag specifying if the underlying collection can be modified
|
E |
next() |
void |
remove() |
protected void |
setModifiable(boolean modifiable)
Flag specifying if the underlying collection can be modified
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected Iterator<E> getProxiedIfModifiable()
UnsupportedOperationException
- if the underlying collection is
unmodifiableprotected Iterator<E> getProxiedForRead()
public boolean isModifiable()
true
if the underlying collection is modifiable, else
false
protected void setModifiable(boolean modifiable)
modifiable
- flagCopyright © 2025. All rights reserved.