Brais Gabin Brais Gabin - 13 days ago 5
Java Question

Aggregate all emited streams and emit them inmidiatly with rxJava

I have a stream that emit pages of data

A, B, C, D...
. Which operator can I use to get a stream like this:
[A], [A, B], [A, B, C], [A, B, C, D]...
?

I know
collect
or
toList
but they only emit once at the end of the stream.

Answer

You can try the 'scan' operator.

Comments