@Test public void testCoalesceTransformer() { final Integer theDefault = 100; final PublishSubject<Integer> source = PublishSubject.create(); final Observable<Integer> result = source .compose(coalesce(theDefault)); final TestSubscriber<Integer> resultTest = TestSubscriber.create(); result.subscribe(resultTest); source.onNext(1); resultTest.assertValue(1); source.onNext(2); resultTest.assertValues(1, 2); source.onNext(null); resultTest.assertValues(1, 2, theDefault); }
public CoalesceTransformer(final @NonNull T theDefault) { this.theDefault = theDefault; }
CoalesceTransformer implements Observable.Transformer<T, T> { public CoalesceTransformer(final @NonNull T theDefault) { this.theDefault = theDefault; } }
CoalesceTransformer implements Observable.Transformer<T, T> { public CoalesceTransformer(final @NonNull T theDefault) { this.theDefault = theDefault; } CoalesceTransformer(final @NonNull T theDefault); }
CoalesceTransformer implements Observable.Transformer<T, T> { public CoalesceTransformer(final @NonNull T theDefault) { this.theDefault = theDefault; } CoalesceTransformer(final @NonNull T theDefault); @Override @NonNull Observable<T> call(final @NonNull Observable<T> source); }
CoalesceTransformer implements Observable.Transformer<T, T> { public CoalesceTransformer(final @NonNull T theDefault) { this.theDefault = theDefault; } CoalesceTransformer(final @NonNull T theDefault); @Override @NonNull Observable<T> call(final @NonNull Observable<T> source);  }