| Modifier and Type | Field and Description |
|---|---|
protected ArrayList |
cache_
The list holding a reference to all seen
Objects. |
protected Iterator |
it_
The wrapped iterator.
|
| Constructor and Description |
|---|
CachedIterator(Iterator it)
Creates a
CachedIterator that wrapps the given Iterator. |
| Modifier and Type | Method and Description |
|---|---|
List |
getCachedObjects()
|
boolean |
hasNext() |
Object |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected Iterator it_
public CachedIterator(Iterator it)
CachedIterator that wrapps the given Iterator.it - the wrapped IteratorNullPointerException - if it is nullpublic void remove()
remove in interface IteratorIterator.remove()public boolean hasNext()
hasNext in interface IteratorIterator.hasNext()public Object next()
next in interface IteratorIterator.next()© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC