com.google.common.collect
Class UnmodifiableListIterator<E>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<E>
com.google.common.collect.UnmodifiableListIterator<E>
- All Implemented Interfaces:
- Iterator<E>, ListIterator<E>
@Beta
@GwtCompatible
public abstract class UnmodifiableListIterator<E>
- extends UnmodifiableIterator<E>
- implements ListIterator<E>
A list iterator that does not support UnmodifiableIterator.remove()
, add(E)
, or
set(E)
.
- Since:
- 7
- Author:
- Louis Wasserman
Method Summary |
void |
add(E e)
Guaranteed to throw an exception and leave the underlying data unmodified. |
void |
set(E e)
Guaranteed to throw an exception and leave the underlying data unmodified. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnmodifiableListIterator
protected UnmodifiableListIterator()
- Constructor for use by subclasses.
add
public final void add(E e)
- Guaranteed to throw an exception and leave the underlying data unmodified.
- Specified by:
add
in interface ListIterator<E>
- Parameters:
e
- the element to insert
- Throws:
UnsupportedOperationException
- always
set
public final void set(E e)
- Guaranteed to throw an exception and leave the underlying data unmodified.
- Specified by:
set
in interface ListIterator<E>
- Parameters:
e
- the element with which to replace the last element returned by
next
or previous
- Throws:
UnsupportedOperationException
- always