public static < T > EventStream < T > merge ( ObservableSet < ? extends EventStream < T > > set ) { return new EventStreamBase < T > ( ) { @ Override protected Subscription observeInputs ( ) { return Subscription . dynamic ( set , s -> s . subscribe ( this :: emit ) ) ; } } ; }
Returns an event stream that emits all the events emitted from any of the event streams in the given observable set . When an event stream is added to the set the returned stream will start emitting its events . When an event stream is removed from the set its events will no longer be emitted from the returned stream .