Skip to content

Commit 6dd1648

Browse files
authored
2.x: Add Maybe marble diagrams 06/21/a (#6053)
1 parent cc186bc commit 6dd1648

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/main/java/io/reactivex/Maybe.java

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public abstract class Maybe<T> implements MaybeSource<T> {
5252
/**
5353
* Runs multiple MaybeSources and signals the events of the first one that signals (cancelling
5454
* the rest).
55+
* <p>
56+
* <img width="640" height="519" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.amb.png" alt="">
5557
* <dl>
5658
* <dt><b>Scheduler:</b></dt>
5759
* <dd>{@code amb} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -71,6 +73,8 @@ public static <T> Maybe<T> amb(final Iterable<? extends MaybeSource<? extends T>
7173
/**
7274
* Runs multiple MaybeSources and signals the events of the first one that signals (cancelling
7375
* the rest).
76+
* <p>
77+
* <img width="640" height="519" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.ambArray.png" alt="">
7478
* <dl>
7579
* <dt><b>Scheduler:</b></dt>
7680
* <dd>{@code ambArray} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -96,6 +100,8 @@ public static <T> Maybe<T> ambArray(final MaybeSource<? extends T>... sources) {
96100
/**
97101
* Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources provided by
98102
* an Iterable sequence.
103+
* <p>
104+
* <img width="640" height="526" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concat.i.png" alt="">
99105
* <dl>
100106
* <dt><b>Backpressure:</b></dt>
101107
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer.</dd>
@@ -215,6 +221,8 @@ public static <T> Flowable<T> concat(
215221
/**
216222
* Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources provided by
217223
* a Publisher sequence.
224+
* <p>
225+
* <img width="640" height="416" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concat.p.png" alt="">
218226
* <dl>
219227
* <dt><b>Backpressure:</b></dt>
220228
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer and
@@ -237,6 +245,8 @@ public static <T> Flowable<T> concat(Publisher<? extends MaybeSource<? extends T
237245
/**
238246
* Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources provided by
239247
* a Publisher sequence.
248+
* <p>
249+
* <img width="640" height="416" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concat.pn.png" alt="">
240250
* <dl>
241251
* <dt><b>Backpressure:</b></dt>
242252
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer and
@@ -263,6 +273,8 @@ public static <T> Flowable<T> concat(Publisher<? extends MaybeSource<? extends T
263273
/**
264274
* Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources in the array.
265275
* <dl>
276+
* <p>
277+
* <img width="640" height="526" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatArray.png" alt="">
266278
* <dt><b>Backpressure:</b></dt>
267279
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer.</dd>
268280
* <dt><b>Scheduler:</b></dt>
@@ -291,7 +303,7 @@ public static <T> Flowable<T> concatArray(MaybeSource<? extends T>... sources) {
291303
* Concatenates a variable number of MaybeSource sources and delays errors from any of them
292304
* till all terminate.
293305
* <p>
294-
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/concat.png" alt="">
306+
* <img width="640" height="425" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatArrayDelayError.png" alt="">
295307
* <dl>
296308
* <dt><b>Backpressure:</b></dt>
297309
* <dd>The operator honors backpressure from downstream.</dd>
@@ -323,6 +335,8 @@ public static <T> Flowable<T> concatArrayDelayError(MaybeSource<? extends T>...
323335
* Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
324336
* source MaybeSources. The operator buffers the value emitted by these MaybeSources and then drains them
325337
* in order, each one after the previous one completes.
338+
* <p>
339+
* <img width="640" height="489" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatArrayEager.png" alt="">
326340
* <dl>
327341
* <dt><b>Backpressure:</b></dt>
328342
* <dd>The operator honors backpressure from downstream.</dd>
@@ -344,7 +358,8 @@ public static <T> Flowable<T> concatArrayEager(MaybeSource<? extends T>... sourc
344358
/**
345359
* Concatenates the Iterable sequence of MaybeSources into a single sequence by subscribing to each MaybeSource,
346360
* one after the other, one at a time and delays any errors till the all inner MaybeSources terminate.
347-
*
361+
* <p>
362+
* <img width="640" height="469" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatDelayError.i.png" alt="">
348363
* <dl>
349364
* <dt><b>Backpressure:</b></dt>
350365
* <dd>The operator honors backpressure from downstream.</dd>
@@ -368,7 +383,8 @@ public static <T> Flowable<T> concatDelayError(Iterable<? extends MaybeSource<?
368383
/**
369384
* Concatenates the Publisher sequence of Publishers into a single sequence by subscribing to each inner Publisher,
370385
* one after the other, one at a time and delays any errors till the all inner and the outer Publishers terminate.
371-
*
386+
* <p>
387+
* <img width="640" height="360" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatDelayError.p.png" alt="">
372388
* <dl>
373389
* <dt><b>Backpressure:</b></dt>
374390
* <dd>{@code concatDelayError} fully supports backpressure.</dd>
@@ -394,6 +410,8 @@ public static <T> Flowable<T> concatDelayError(Publisher<? extends MaybeSource<?
394410
* Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
395411
* source MaybeSources. The operator buffers the values emitted by these MaybeSources and then drains them
396412
* in order, each one after the previous one completes.
413+
* <p>
414+
* <img width="640" height="526" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatEager.i.png" alt="">
397415
* <dl>
398416
* <dt><b>Backpressure:</b></dt>
399417
* <dd>Backpressure is honored towards the downstream.</dd>
@@ -418,6 +436,8 @@ public static <T> Flowable<T> concatEager(Iterable<? extends MaybeSource<? exten
418436
* Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
419437
* emitted source Publishers as they are observed. The operator buffers the values emitted by these
420438
* Publishers and then drains them in order, each one after the previous one completes.
439+
* <p>
440+
* <img width="640" height="511" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.concatEager.p.png" alt="">
421441
* <dl>
422442
* <dt><b>Backpressure:</b></dt>
423443
* <dd>Backpressure is honored towards the downstream and the outer Publisher is

0 commit comments

Comments
 (0)