de.lmu.ifi.dbs.elki.utilities.iterator
Class UnmodifiableListIterator<T>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.iterator.UnmodifiableListIterator<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Iterator<T>, ListIterator<T>
public final class UnmodifiableListIterator<T>
- extends Object
- implements ListIterator<T>
Iterator proxy that does not allow modifications.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inner
private ListIterator<T> inner
- Real iterator
UnmodifiableListIterator
public UnmodifiableListIterator(ListIterator<T> inner)
- Constructor.
- Parameters:
inner
- Real iterator to proxy.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<T>
- Specified by:
hasNext
in interface ListIterator<T>
next
public T next()
- Specified by:
next
in interface Iterator<T>
- Specified by:
next
in interface ListIterator<T>
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interface ListIterator<T>
previous
public T previous()
- Specified by:
previous
in interface ListIterator<T>
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interface ListIterator<T>
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interface ListIterator<T>
remove
public void remove()
- Specified by:
remove
in interface Iterator<T>
- Specified by:
remove
in interface ListIterator<T>
add
public void add(T e)
- Specified by:
add
in interface ListIterator<T>
set
public void set(T e)
- Specified by:
set
in interface ListIterator<T>