Package org.apache.beam.sdk.fn.stream
Class PrefetchableIterables
- java.lang.Object
-
- org.apache.beam.sdk.fn.stream.PrefetchableIterables
-
public class PrefetchableIterables extends java.lang.ObjectThis class contains static utility functions that operate on or return objects of typePrefetchableIterable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrefetchableIterables.Default<T>A default implementation that caches an iterator to be returned whenPrefetchableIterables.Default.prefetch()is invoked.
-
Constructor Summary
Constructors Constructor Description PrefetchableIterables()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> PrefetchableIterable<T>concat(java.lang.Iterable<T>... iterables)Concatentates theIterables.static <T> PrefetchableIterable<T>emptyIterable()Returns an emptyPrefetchableIterable.static <T> PrefetchableIterable<T>fromArray(T... values)Returns aPrefetchableIterableover the specified values.static <T> PrefetchableIterable<T>limit(java.lang.Iterable<T> iterable, int limit)Limits thePrefetchableIterableto the specified number of elements.
-
-
-
Method Detail
-
emptyIterable
public static <T> PrefetchableIterable<T> emptyIterable()
Returns an emptyPrefetchableIterable.
-
fromArray
public static <T> PrefetchableIterable<T> fromArray(T... values)
Returns aPrefetchableIterableover the specified values.PrefetchableIterator.prefetch()is a no-op andPrefetchableIterator.isReady()always returns true.
-
concat
public static <T> PrefetchableIterable<T> concat(java.lang.Iterable<T>... iterables)
Concatentates theIterables.See
PrefetchableIterators.concat(java.util.Iterator<T>...)for additional details.
-
limit
public static <T> PrefetchableIterable<T> limit(java.lang.Iterable<T> iterable, int limit)
Limits thePrefetchableIterableto the specified number of elements.
-
-