Modifier and Type | Method and Description |
---|---|
static Long |
count(Stream stream) |
static Stream |
distinct(Stream stream,
Collection collection) |
static Stream |
filter(Stream stream,
Collection collection,
Closure<Boolean> predicate) |
static void |
forEach(Stream stream,
Closure consumer) |
static io.toro.gloop.object.property.GloopModel |
groupBy(Stream<io.toro.gloop.object.property.GloopModel> stream,
Collection<io.toro.gloop.object.property.GloopModel> collection,
String groupBy) |
static Stream |
limit(Stream stream,
Collection collection,
long limit) |
static Stream |
skip(Stream stream,
Collection collection,
long skip) |
static Stream<io.toro.gloop.object.property.GloopModel> |
sorted(Stream<io.toro.gloop.object.property.GloopModel> stream,
Collection<io.toro.gloop.object.property.GloopModel> collection,
String sortBy) |
static Stream |
sorted(Stream stream,
Collection collection) |
static Stream |
sorted(Stream stream,
Collection collection,
Closure<Integer> comparator) |
static List |
toList(Stream stream) |
static Stream |
toStream(Collection collection) |
@GloopComment(value="Converts an array of items into a stream.") @GloopObjectParameter(value="output:a stream of elements from an array{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream toStream(@GloopParameter(value="array to convert to Stream") Collection collection)
@GloopComment(value="Filters out items based on a given condition.") @GloopObjectParameter(value="output:a stream of filtered elements{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream filter(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="array data source") Collection collection, @GloopParameter(value="the condition for filtering") Closure<Boolean> predicate)
@GloopComment(value="Sorts items in natural order.") @GloopObjectParameter(value="output:a stream of elements sorted by natural order{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream sorted(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="array data source") Collection collection)
@GloopComment(value="Sorts items based on a provided comparator.") @GloopObjectParameter(value="output:a stream of elements sorted by a comparator{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream sorted(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="array data source") Collection collection, @GloopParameter(value="the closure to determine order") Closure<Integer> comparator)
@GloopComment(value="Sorts Gloop Models by a certain property.") @GloopObjectParameter(value="output:a stream of Gloop Models sorted by a property{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream<io.toro.gloop.object.property.GloopModel> sorted(@GloopParameter(value="stream data source") Stream<io.toro.gloop.object.property.GloopModel> stream, @GloopParameter(value="array data source") Collection<io.toro.gloop.object.property.GloopModel> collection, @GloopParameter(value="property to use as basis for sorting") String sortBy)
@GloopComment(value="Limits the items to be processed.") @GloopObjectParameter(value="output:a limited stream of items{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream limit(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="array data source") Collection collection, @GloopParameter(value="the amount to process") long limit)
@GloopComment(value="Skips n number of items in the stream.") @GloopObjectParameter(value="output:a limited stream of items{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream skip(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="array data source") Collection collection, @GloopParameter(value="the number of leading elements to skip") long skip)
@GloopComment(value="Filters out duplicates of an item.") @GloopObjectParameter(value="output:a stream of distinct items{\noutput:object:output Stream::::::stream.Stream\n}") public static Stream distinct(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="array data source") Collection collection)
@GloopComment(value="Counts the number of items from the stream.") @GloopObjectParameter(value="output:the number of elements{\noutput:long:count of items\n}") public static Long count(@GloopParameter(value="stream data source") Stream stream)
@GloopComment(value="Collects the stream elements into a new List.") @GloopObjectParameter(value="output:a list of items collected from a Stream{\noutput[]:object:array of items\n}") public static List toList(@GloopParameter(value="stream data source") Stream stream)
@GloopComment(value="Consumes each element of the stream to do a provided operation.") public static void forEach(@GloopParameter(value="stream data source") Stream stream, @GloopParameter(value="the closure to apply each item to") Closure consumer)
@GloopComment(value="Groups together elements based on a property of a Gloop Model.") @GloopObjectParameter(value="output:a grouping of items from a Stream{\ngroups[]{\nkey\nelements[]{\n}\n}\n}") public static io.toro.gloop.object.property.GloopModel groupBy(@GloopParameter(value="stream data source") Stream<io.toro.gloop.object.property.GloopModel> stream, @GloopParameter(value="array data source") Collection<io.toro.gloop.object.property.GloopModel> collection, @GloopParameter(value="the property to group items") String groupBy)
Copyright © 2019. All rights reserved.