Skip to content

Commit 53dd15f

Browse files
authored
2.x: Add Completable marble diagrams (07/17a) (#6083)
1 parent 535ab35 commit 53dd15f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/main/java/io/reactivex/Completable.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public abstract class Completable implements CompletableSource {
106106
/**
107107
* Returns a Completable which terminates as soon as one of the source Completables
108108
* terminates (normally or with an error) and cancels all other Completables.
109+
* <p>
110+
* <img width="640" height="518" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.ambArray.png" alt="">
109111
* <dl>
110112
* <dt><b>Scheduler:</b></dt>
111113
* <dd>{@code ambArray} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -132,6 +134,8 @@ public static Completable ambArray(final CompletableSource... sources) {
132134
/**
133135
* Returns a Completable which terminates as soon as one of the source Completables
134136
* terminates (normally or with an error) and cancels all other Completables.
137+
* <p>
138+
* <img width="640" height="518" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.amb.png" alt="">
135139
* <dl>
136140
* <dt><b>Scheduler:</b></dt>
137141
* <dd>{@code amb} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -151,6 +155,8 @@ public static Completable amb(final Iterable<? extends CompletableSource> source
151155

152156
/**
153157
* Returns a Completable instance that completes immediately when subscribed to.
158+
* <p>
159+
* <img width="640" height="472" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.complete.png" alt="">
154160
* <dl>
155161
* <dt><b>Scheduler:</b></dt>
156162
* <dd>{@code complete} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -165,6 +171,8 @@ public static Completable complete() {
165171

166172
/**
167173
* Returns a Completable which completes only when all sources complete, one after another.
174+
* <p>
175+
* <img width="640" height="283" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.concatArray.png" alt="">
168176
* <dl>
169177
* <dt><b>Scheduler:</b></dt>
170178
* <dd>{@code concatArray} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -188,6 +196,8 @@ public static Completable concatArray(CompletableSource... sources) {
188196

189197
/**
190198
* Returns a Completable which completes only when all sources complete, one after another.
199+
* <p>
200+
* <img width="640" height="303" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.concat.png" alt="">
191201
* <dl>
192202
* <dt><b>Scheduler:</b></dt>
193203
* <dd>{@code concat} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -206,6 +216,8 @@ public static Completable concat(Iterable<? extends CompletableSource> sources)
206216

207217
/**
208218
* Returns a Completable which completes only when all sources complete, one after another.
219+
* <p>
220+
* <img width="640" height="237" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.concat.p.png" alt="">
209221
* <dl>
210222
* <dt><b>Backpressure:</b></dt>
211223
* <dd>The returned {@code Completable} honors the backpressure of the downstream consumer
@@ -226,6 +238,8 @@ public static Completable concat(Publisher<? extends CompletableSource> sources)
226238

227239
/**
228240
* Returns a Completable which completes only when all sources complete, one after another.
241+
* <p>
242+
* <img width="640" height="237" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.concat.pn.png" alt="">
229243
* <dl>
230244
* <dt><b>Backpressure:</b></dt>
231245
* <dd>The returned {@code Completable} honors the backpressure of the downstream consumer
@@ -312,6 +326,8 @@ public static Completable unsafeCreate(CompletableSource source) {
312326

313327
/**
314328
* Defers the subscription to a Completable instance returned by a supplier.
329+
* <p>
330+
* <img width="640" height="298" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.defer.png" alt="">
315331
* <dl>
316332
* <dt><b>Scheduler:</b></dt>
317333
* <dd>{@code defer} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -330,6 +346,8 @@ public static Completable defer(final Callable<? extends CompletableSource> comp
330346
* Creates a Completable which calls the given error supplier for each subscriber
331347
* and emits its returned Throwable.
332348
* <p>
349+
* <img width="640" height="462" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.error.f.png" alt="">
350+
* <p>
333351
* If the errorSupplier returns null, the child CompletableObservers will receive a
334352
* NullPointerException.
335353
* <dl>
@@ -349,6 +367,8 @@ public static Completable error(final Callable<? extends Throwable> errorSupplie
349367

350368
/**
351369
* Creates a Completable instance that emits the given Throwable exception to subscribers.
370+
* <p>
371+
* <img width="640" height="462" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.error.png" alt="">
352372
* <dl>
353373
* <dt><b>Scheduler:</b></dt>
354374
* <dd>{@code error} does not operate by default on a particular {@link Scheduler}.</dd>

0 commit comments

Comments
 (0)