RX Java – create an observable by combining other observables, and issue events from the first sampling
•
Java
When one is an infinite data source, I need to combine two observers, and the other is an indicator that obtains the last value from the first one
I saw it http://reactivex.io/documentation/operators.html#combining But none of them met my requirements
Solution
This can be easily achieved using flatmap:
observable2 .flatMap(value -> observable1.take(1))
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码