com.google.common.collect
Class AbstractRemovableIterator<T>
java.lang.Object
com.google.common.collect.AbstractIterator<T>
com.google.common.collect.AbstractRemovableIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public abstract class AbstractRemovableIterator<T>
- extends AbstractIterator<T>
A specialization of AbstractIterator
for data sources which can
handle arbitrary removal by element, concurrently with iteration. Subclasses
must implement both the AbstractIterator.computeNext()
and remove(Object)
methods.
- Author:
- Kevin Bourrillion
Method Summary |
T |
next()
|
void |
remove()
Removes from the underlying collection the last element returned by the
iterator. |
protected abstract void |
remove(T element)
Removes element from the backing data source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRemovableIterator
public AbstractRemovableIterator()
remove
protected abstract void remove(T element)
- Removes
element
from the backing data source.
next
public T next()
- Specified by:
next
in interface Iterator<T>
- Overrides:
next
in class AbstractIterator<T>
remove
public void remove()
- Removes from the underlying collection the last element returned by the
iterator.
- Specified by:
remove
in interface Iterator<T>
- Overrides:
remove
in class AbstractIterator<T>