|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openstreetmap.osmosis.core.store.StoreReleasingIterator<DataType>
DataType - The type of data to be returned by the iterator.public class StoreReleasingIterator<DataType>
This class allows an underlying store to be released along with the iterator accessing it. As such it acts as an iterator delegating all calls to a provided iterator, but during release it also releases the data store.
| Constructor Summary | |
|---|---|
StoreReleasingIterator(ReleasableIterator<DataType> iterator,
Releasable store)
Creates a new instance. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
DataType |
next()
|
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 StoreReleasingIterator(ReleasableIterator<DataType> iterator,
Releasable store)
iterator - The underlying iterator to read from.store - The store to be released after use.| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<DataType>public DataType next()
next in interface java.util.Iterator<DataType>public void remove()
remove in interface java.util.Iterator<DataType>public void release()
release in interface Releasable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||