Grouping and Windowing
Functions that collect elements into groups or windows
Gatherers
| Function | Description |
|---|---|
| group() | Turn a Stream<INPUT> into a Stream<List<INPUT>> where adjacent equal elements are in the same List and equality is measured by Object::equals(). |
| groupBy() | Turn a Stream<INPUT> into a Stream<List<INPUT>> where adjacent equal elements are in the same List and equality is measured by the given mappingFunction. |
| groupOrdered() | Convert the input stream of Comparable objects into lists of ordered objects. |
| groupOrderedBy() | Convert the input stream of objects into lists of ordered objects, as measured by the given Comparator. |
| window() | Create windows over the elements of the input stream that are windowSize in length, sliding over stepping elements and optionally including partial windows at the end of the stream. |