Class UnionIterable
java.lang.Object
com.invirgance.convirgance.transform.sets.UnionIterable
- All Implemented Interfaces:
Iterable<JSONObject>
Combines multiple streams of data into a single stream. Can be used to merge
disparate sources such as files and database queries into a single resulting
stream.
Does not attempt to de-duplicate data.
Does not attempt to de-duplicate data.
- Author:
- jbanes
-
Constructor Summary
ConstructorsConstructorDescriptionUnionIterable
(Iterable<JSONObject>... streams) Creates a UnionIterable to merge the provided streams -
Method Summary
Modifier and TypeMethodDescriptioniterator()
Returns an iterator that streams through each source sequentiallyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
UnionIterable
Creates a UnionIterable to merge the provided streams- Parameters:
streams
- the streams to merge into one
-
-
Method Details
-
iterator
Returns an iterator that streams through each source sequentially- Specified by:
iterator
in interfaceIterable<JSONObject>
- Returns:
- An iterator that contains the supplied streams
-