Package org.apache.beam.sdk.fn.stream
Class PrefetchableIterators
java.lang.Object
org.apache.beam.sdk.fn.stream.PrefetchableIterators
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic <T> PrefetchableIterator<T> Concatentates theIterators.static <T> PrefetchableIterator<T> concatIterators(Iterator<Iterator<T>> iterators) static <T> PrefetchableIterator<T> Returns an emptyPrefetchableIterator.static <T> PrefetchableIterator<T> fromArray(T... values) Returns aPrefetchableIteratorover the specified values. 
- 
Constructor Details
- 
PrefetchableIterators
public PrefetchableIterators() 
 - 
 - 
Method Details
- 
emptyIterator
Returns an emptyPrefetchableIterator. - 
fromArray
Returns aPrefetchableIteratorover the specified values.PrefetchableIterator.prefetch()is a no-op andPrefetchableIterator.isReady()always returns true. - 
concatIterators
 - 
concat
Concatentates theIterators.Iterables are first converted into aPrefetchableIterableviamaybePrefetchable(java.util.Iterator<T>).The returned
PrefetchableIterableensures that iterators which are returned guarantee thatPrefetchableIterator.isReady()always advances till it finds anIterablethat is notPrefetchableIterator.isReady().PrefetchableIterator.prefetch()is also guaranteed to advance past empty iterators till it finds one that is not ready. 
 -