You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/paradox/stream/operators/index.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,8 @@ These built-in sinks are available from @scala[`org.apache.pekko.stream.scaladsl
60
60
|Sink|<aname="collection"></a>@ref[collection](Sink/collection.md)|@scala[Collect all values emitted from the stream into a collection.]@java[Operator only available in the Scala API. The closest operator in the Java API is @ref[`Sink.seq`](Sink/seq.md)].|
61
61
|Sink|<aname="combine"></a>@ref[combine](Sink/combine.md)|Combine several sinks into one using a user specified strategy|
62
62
|Sink|<aname="completionstagesink"></a>@ref[completionStageSink](Sink/completionStageSink.md)|Streams the elements to the given future sink once it successfully completes. |
63
-
|Sink|<aname="fold"></a>@ref[fold](Sink/fold.md)|Fold over emitted element with a function, where each invocation will get the new element and the result from the previous fold invocation.|
63
+
|Sink|<aname="fold"></a>@ref[fold](Sink/fold.md)|Fold over emitted elements with a function, where each invocation will get the new element and the result from the previous fold invocation.|
64
+
|Sink|<aname="foldwhile"></a>@ref[foldWhile](Sink/foldWhile.md)|Fold over emitted elements with a function, where each invocation will get the new element and the result from the previous fold invocation.|
64
65
|Sink|<aname="forall"></a>@ref[forall](Sink/forall.md)|Apply a predicate function to assert each element received, it returns true if all elements satisfy the assertion, otherwise it returns false.|
65
66
|Sink|<aname="foreach"></a>@ref[foreach](Sink/foreach.md)|Invoke a given procedure for each element received.|
66
67
|Sink|<aname="foreachasync"></a>@ref[foreachAsync](Sink/foreachAsync.md)|Invoke a given procedure asynchronously for each element received.|
@@ -145,6 +146,7 @@ depending on being backpressured by downstream or not.
145
146
|--|--|--|
146
147
|Flow|<aname="asflowwithcontext"></a>@ref[asFlowWithContext](Flow/asFlowWithContext.md)|Extracts context data from the elements of a `Flow` so that it can be turned into a `FlowWithContext` which can propagate that context per element along a stream.|
147
148
|Source/Flow|<aname="collect"></a>@ref[collect](Source-or-Flow/collect.md)|Apply a partial function to each incoming element, if the partial function is defined for a value the returned value is passed downstream.|
149
+
|Source/Flow|<aname="collectfirst"></a>@ref[collectFirst](Source-or-Flow/collectFirst.md)|Transform this stream by applying the given partial function to the first element on which the function is defined as it pass through this processing step, and cancel the upstream publisher after the first element is emitted.|
148
150
|Source/Flow|<aname="collecttype"></a>@ref[collectType](Source-or-Flow/collectType.md)|Transform this stream by testing the type of each of the elements on which the element is an instance of the provided type as they pass through this processing step.|
149
151
|Source/Flow|<aname="collectwhile"></a>@ref[collectWhile](Source-or-Flow/collectWhile.md)|Transform this stream by applying the given partial function to each of the elements on which the function is defined as they pass through this processing step, and cancel the upstream publisher after the partial function is not applied.|
150
152
|Flow|<aname="completionstageflow"></a>@ref[completionStageFlow](Flow/completionStageFlow.md)|Streams the elements through the given future flow once it successfully completes.|
@@ -158,6 +160,7 @@ depending on being backpressured by downstream or not.
158
160
|Flow|<aname="flattenoptional"></a>@ref[flattenOptional](Flow/flattenOptional.md)|Collect the value of `Optional` from all the elements passing through this flow , empty `Optional` is filtered out.|
159
161
|Source/Flow|<aname="fold"></a>@ref[fold](Source-or-Flow/fold.md)|Start with current value `zero` and then apply the current and next value to the given function. When upstream completes, the current value is emitted downstream.|
160
162
|Source/Flow|<aname="foldasync"></a>@ref[foldAsync](Source-or-Flow/foldAsync.md)|Just like `fold` but receives a function that results in a @scala[`Future`]@java[`CompletionStage`] to the next value.|
163
+
|Source/Flow|<aname="foldwhile"></a>@ref[foldWhile](Source-or-Flow/foldWhile.md)|Start with current value `zero` and then apply the current and next value to the given function. When upstream completes or the predicate `p` returns `false`, the current value is emitted downstream.|
161
164
|Source/Flow|<aname="frommaterializer"></a>@ref[fromMaterializer](Source-or-Flow/fromMaterializer.md)|Defer the creation of a `Source/Flow` until materialization and access `Materializer` and `Attributes`|
162
165
|Flow|<aname="futureflow"></a>@ref[futureFlow](Flow/futureFlow.md)|Streams the elements through the given future flow once it successfully completes.|
163
166
|Source/Flow|<aname="grouped"></a>@ref[grouped](Source-or-Flow/grouped.md)|Accumulate incoming events until the specified number of elements have been accumulated and then pass the collection of elements downstream.|
@@ -413,6 +416,7 @@ For more background see the @ref[Error Handling in Streams](../stream-error.md)
413
416
*[cancelled](Sink/cancelled.md)
414
417
*[collect](Source-or-Flow/collect.md)
415
418
*[collect](Sink/collect.md)
419
+
*[collectFirst](Source-or-Flow/collectFirst.md)
416
420
*[collection](Sink/collection.md)
417
421
*[collectType](Source-or-Flow/collectType.md)
418
422
*[collectWhile](Source-or-Flow/collectWhile.md)
@@ -452,6 +456,8 @@ For more background see the @ref[Error Handling in Streams](../stream-error.md)
0 commit comments