Package org.apache.iceberg.util
Class SortedMerge<T>
- java.lang.Object
-
- org.apache.iceberg.io.CloseableGroup
-
- org.apache.iceberg.util.SortedMerge<T>
-
- Type Parameters:
T
- the type of objects produced by this Iterable
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Iterable<T>
,CloseableIterable<T>
public class SortedMerge<T> extends CloseableGroup implements CloseableIterable<T>
An Iterable that merges the items from other Iterables in order.This assumes that the Iterables passed in produce items in sorted order.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.iceberg.io.CloseableIterable
CloseableIterable.ConcatCloseableIterable<E>
-
-
Constructor Summary
Constructors Constructor Description SortedMerge(java.util.Comparator<T> comparator, java.util.List<CloseableIterable<T>> iterables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseableIterator<T>
iterator()
Returns an closeable iterator over elements of typeT
.-
Methods inherited from class org.apache.iceberg.io.CloseableGroup
addCloseable, addCloseable, close, setSuppressCloseFailure
-
-
-
-
Constructor Detail
-
SortedMerge
public SortedMerge(java.util.Comparator<T> comparator, java.util.List<CloseableIterable<T>> iterables)
-
-
Method Detail
-
iterator
public CloseableIterator<T> iterator()
Description copied from interface:CloseableIterable
Returns an closeable iterator over elements of typeT
.- Specified by:
iterator
in interfaceCloseableIterable<T>
- Specified by:
iterator
in interfacejava.lang.Iterable<T>
- Returns:
- an
CloseableIterator
.
-
-