Package org.geotools.data
Class DefaultCloseableIterator<T>
- Object
-
- DefaultCloseableIterator<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<T>,CloseableIterator<T>
public class DefaultCloseableIterator<T> extends Object implements CloseableIterator<T>
Default implementation of CloseableIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected CloseablecloseableItemprotected Iterator<T>wrapped
-
Constructor Summary
Constructors Constructor Description DefaultCloseableIterator(Iterator<T> wrapped)DefaultCloseableIterator(Iterator<T> wrapped, Closeable closeable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the underlying iterator in case it implementsCloseableIterator.protected voidfinalize()booleanhasNext()Tnext()voidremove()-
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Iterator
forEachRemaining
-
-
-
-
Method Detail
-
close
public void close()
Closes the underlying iterator in case it implementsCloseableIterator.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<T>
-
-