E
- the type of elements in this iteratorpublic abstract class ProxiedListIterator<E> extends ProxiedIterator<E> implements ListIterator<E>
ListIterator
implementation pointing to a given iterator.Modifier | Constructor and Description |
---|---|
protected |
ProxiedListIterator(ListIterator<E> listIterator)
An abstract
ListIterator implementation pointing to a given iterator. |
Modifier and Type | Method and Description |
---|---|
void |
add(E element) |
protected ListIterator<E> |
getProxiedForRead()
Returns the wrapped iterator without verifying if modifying the underlying
collection is prohibited.
|
protected ListIterator<E> |
getProxiedIfModifiable()
Verifies if the underlying collection is modifiable and either returns the
wrapped iterator or throws an appropriate exception.
|
boolean |
hasPrevious() |
int |
nextIndex() |
E |
previous() |
int |
previousIndex() |
void |
set(E element) |
equals, hashCode, hasNext, isModifiable, next, remove, setModifiable
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
hasNext, next, remove
forEachRemaining
protected ProxiedListIterator(ListIterator<E> listIterator)
ListIterator
implementation pointing to a given iterator.listIterator
- the iterator to proxypublic void add(@Nullable E element)
add
in interface ListIterator<E>
protected ListIterator<E> getProxiedIfModifiable()
getProxiedIfModifiable
in class ProxiedIterator<E>
protected ListIterator<E> getProxiedForRead()
getProxiedForRead
in class ProxiedIterator<E>
public boolean hasPrevious()
hasPrevious
in interface ListIterator<E>
public int nextIndex()
nextIndex
in interface ListIterator<E>
@Nullable public E previous()
previous
in interface ListIterator<E>
public int previousIndex()
previousIndex
in interface ListIterator<E>
public void set(@Nullable E element)
set
in interface ListIterator<E>
Copyright © 2025. All rights reserved.