combineLatest4<A, B, C, D, T> method

Observable<T> combineLatest4<A, B, C, D, T>(
  1. Stream<A> streamA,
  2. Stream<B> streamB,
  3. Stream<C> streamC,
  4. Stream<D> streamD,
  5. T combiner(
    1. A a,
    2. B b,
    3. C c,
    4. D d

Merges the given Streams into one Observable sequence by using the combiner function whenever any of the observable sequences emits an item.

The Observable will not emit until all streams have emitted at least one item.

Interactive marble diagram


  new Observable.just("a"),
  new Observable.just("b"),
  new Observable.just("c"),
  new Observable.fromIterable(["d", "d"]),
  (a, b, c, d) => a + b + c + d)
.listen(print); //prints "abcd", "abcd"


static Observable<T> combineLatest4<A, B, C, D, T>(
        Stream<A> streamA,
        Stream<B> streamB,
        Stream<C> streamC,
        Stream<D> streamD,
        T combiner(A a, B b, C c, D d)) =>
        streamA, streamB, streamC, streamD, combiner));