Class CloseableIterable<T>
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.util.CloseableIterable<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Iterable<T>
public class CloseableIterable<T> extends java.lang.Object implements java.lang.Iterable<T>, java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description CloseableIterable(java.lang.Iterable<T> iterable, java.io.Closeable closeable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
@NotNull java.util.Iterator<T>
iterator()
static <T> CloseableIterable<T>
wrap(java.lang.Iterable<T> iterable)
static <T> CloseableIterable<T>
wrap(java.lang.Iterable<T> iterable, java.io.Closeable closeable)
-
-
-
Constructor Detail
-
CloseableIterable
public CloseableIterable(java.lang.Iterable<T> iterable, java.io.Closeable closeable)
-
-
Method Detail
-
wrap
public static <T> CloseableIterable<T> wrap(java.lang.Iterable<T> iterable, java.io.Closeable closeable)
-
wrap
public static <T> CloseableIterable<T> wrap(java.lang.Iterable<T> iterable)
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-