Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as they are consumed from the resulting stream. @param action the action to perform on the element as they are consumed from the stream @return the new stream
(Consumer<? super T> action)
| 176 | * @return the new stream |
| 177 | */ |
| 178 | public Stream<T> peek(Consumer<? super T> action) { |
| 179 | return new Stream<>(streamBuilder, addProcessorNode(new PeekProcessor<>(action), node.getOutputFields(), true)); |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * Aggregates the values in this stream using the aggregator. This does a global aggregation of values across all partitions. |
no test coverage detected