|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.store.PeekableIterator<T>
T
- The type of entity to retrieved.public class PeekableIterator<T>
Wraps a releasable iterator and adds the ability to peek at the next value without moving to the next record.
Constructor Summary | |
---|---|
PeekableIterator(ReleasableIterator<T> sourceIterator)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
hasNext()
|
T |
next()
|
T |
peekNext()
Returns the next available entity without advancing to the next record. |
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeekableIterator(ReleasableIterator<T> sourceIterator)
sourceIterator
- The underlying iterator providing source data. This will be
owned and released by this object.Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public T peekNext()
public T next()
next
in interface java.util.Iterator<T>
public void release()
release
in interface Releasable
public void remove()
remove
in interface java.util.Iterator<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |