Class CloseableIterator<T>
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.util.CloseableIterator<T>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.util.Iterator<T>
public class CloseableIterator<T> extends java.lang.Object implements java.util.Iterator<T>, java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description CloseableIterator(java.util.Iterator<T> iterable, java.io.Closeable closeable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()Tnext()voidremove()static <T> CloseableIterator<T>wrap(java.util.Iterator<T> iterator)static <T> CloseableIterator<T>wrap(java.util.Iterator<T> iterator, java.io.Closeable closeable)
-
-
-
Constructor Detail
-
CloseableIterator
public CloseableIterator(java.util.Iterator<T> iterable, java.io.Closeable closeable)
-
-
Method Detail
-
wrap
public static <T> CloseableIterator<T> wrap(java.util.Iterator<T> iterator, java.io.Closeable closeable)
-
wrap
public static <T> CloseableIterator<T> wrap(java.util.Iterator<T> iterator)
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<T>
-
-