Class CloseableIterator<T>
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.util.CloseableIterator<T>
-
-
Constructor Summary
Constructors Constructor Description CloseableIterator(Iterator<T> iterable, Closeable closeable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
T
next()
void
remove()
static <T> CloseableIterator<T>
wrap(Iterator<T> iterator)
static <T> CloseableIterator<T>
wrap(Iterator<T> iterator, Closeable closeable)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
wrap
public static <T> CloseableIterator<T> wrap(Iterator<T> iterator, Closeable closeable)
-
wrap
public static <T> CloseableIterator<T> wrap(Iterator<T> iterator)
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-