Skip to content

Operator Matrix

David Karnok edited this page Jan 30, 2020 · 31 revisions
Operator Flowable Observable Maybe Single Completable
all present present absent (1) absent (1) absent (2)
amb present present present present present
ambArray present present present present present
ambWith present present present present present
andThen absent (3) absent (3) absent (3) absent (3) present
any present present absent (1) absent (1) absent (2)
blockingAwait absent (4) absent (4) absent (5) absent (5) present
blockingFirst present present absent (6) absent (6) absent (7)
blockingForEach present present absent (8) absent (8) absent (8)
blockingGet absent (4) absent (4) present present absent (7)
blockingIterable present present absent (6) absent (6) absent (7)
blockingLast present present absent (6) absent (6) absent (7)
blockingLatest present present absent (6) absent (6) absent (7)
blockingMostRecent present present absent (6) absent (6) absent (7)
blockingNext present present absent (6) absent (6) absent (7)
blockingSingle present present absent (6) absent (6) absent (7)
blockingStream present present absent (6) absent (6) absent (7)
blockingSubscribe present present present present present
buffer present present absent (9) absent (10) absent (11)
cache present present present present present
cacheWithInitialCapacity present present absent (12) absent (12) absent (12)
cast present present present present absent (2)
collect present present absent (13) absent (14) absent (15)
collectInto present present absent (13) absent (14) absent (15)
combineLatest present present absent (16) absent (16) absent (17)
combineLatestArray present present absent (18) absent (18) absent (19)
combineLatestArrayDelayError present present absent (18) absent (18) absent (20)
combineLatestDelayError present present absent (16) absent (16) absent (21)
complete absent (22) absent (22) absent (22) absent (23) present
compose present present present present present
concat present present present present present
concatArray present present present present present
concatArrayDelayError present present present present present
concatArrayEager present present present present absent (24)
concatArrayEagerDelayError present present present present absent (25)
concatDelayError present present present present present
concatEager present present present present absent (26)
concatEagerDelayError present present present present absent (27)
concatMap present present present present absent (28)
concatMapCompletable present present present present absent (28)
concatMapCompletableDelayError present present absent (29) absent (29) absent (28)
concatMapDelayError present present absent (30) absent (30) absent (28)
concatMapEager present present absent (31) absent (31) absent (28)
concatMapEagerDelayError present present absent (31) absent (31) absent (28)
concatMapIterable present present absent (32) absent (32) absent (28)
concatMapMaybe present present absent (33) present absent (28)
concatMapMaybeDelayError present present absent (34) absent (34) absent (28)
concatMapSingle present present present absent (35) absent (28)
concatMapSingleDelayError present present absent (36) absent (36) absent (28)
concatMapStream present present absent (37) absent (37) absent (28)
concatWith present present present present present
contains present present present present absent (2)
count present present present absent (38) absent (39)
create present present present present present
debounce present present absent (40) absent (40) absent (41)
defaultIfEmpty present present present absent (23) absent (42)
defer present present present present present
delay present present present present present
delaySubscription present present present present present
dematerialize present present present present absent (41)
distinct present present absent (43) absent (43) absent (41)
distinctUntilChanged present present absent (43) absent (43) absent (41)
doAfterNext present present absent (44) absent (44) absent (2)
doAfterSuccess absent (45) absent (45) present present absent (41)
doAfterTerminate present present present present present
doFinally present present present present present
doOnCancel present absent (46) absent (46) absent (46) absent (46)
doOnComplete present present present absent (47) present
doOnDispose absent (48) present present present present
doOnEach present present absent (49) absent (49) absent (41)
doOnError present present present present present
doOnEvent absent (50) absent (50) present present present
doOnLifecycle present present present present present
doOnNext present present absent (51) absent (51) absent (41)
doOnRequest present absent (52) absent (52) absent (52) absent (52)
doOnSubscribe present present present present present
doOnSuccess absent (53) absent (53) present present absent (41)
doOnTerminate present present present present present
elementAt present present absent (54) absent (55) absent (41)
elementAtOrError present present absent (56) absent (55) absent (41)
empty present present present absent (23) absent (57)
error present present present present present
filter present present present present absent (41)
first present present absent (58) absent (59) absent (42)
firstElement present present absent (60) absent (61) absent (2)
firstOrError present present absent (60) absent (61) absent (62)
firstOrErrorStage present present absent (63) absent (63) absent (64)
firstStage present present absent (63) absent (63) absent (63)
flatMap present present present present absent (28)
flatMapCompletable present present present present absent (28)
flatMapIterable present present absent (32) absent (32) absent (28)
flatMapMaybe present present absent (65) present absent (28)
flatMapObservable absent (66) absent (67) present present absent (28)
flatMapPublisher absent (67) absent (68) present present absent (28)
flatMapSingle present present present absent (65) absent (28)
flatMapStream present present absent (37) absent (37) absent (28)
flattenAsFlowable absent (69) absent (69) present present absent (28)
flattenAsObservable absent (69) absent (69) present present absent (28)
flattenStreamAsFlowable absent (70) absent (70) present present absent (28)
flattenStreamAsObservable absent (70) absent (70) present present absent (28)
forEach present present absent (71) absent (71) absent (71)
forEachWhile present present absent (71) absent (71) absent (71)
fromAction present present present absent (23) present
fromArray present present absent (72) absent (73) absent (74)
fromCallable present present present present present
fromCompletable present present present absent (75) absent (76)
fromCompletionStage present present present present present
fromFuture present present present present present
fromIterable present present absent (72) absent (73) absent (74)
fromMaybe present present absent (76) present present
fromObservable present absent (76) present present present
fromOptional present present present absent (73) absent (74)
fromPublisher present present present present present
fromRunnable present present present absent (23) present
fromSingle present present present absent (76) present
fromStream present present absent (72) absent (73) absent (74)
fromSupplier present present present present present
generate present present absent (77) absent (77) absent (77)
groupBy present present absent (78) absent (78) absent (79)
groupJoin present present absent (78) absent (78) absent (80)
hide present present present present present
ignoreElement absent (81) absent (81) present present absent (2)
ignoreElements present present absent (82) absent (82) absent (2)
interval present present absent (83) absent (83) absent (83)
intervalRange present present absent (83) absent (83) absent (83)
isEmpty present present present absent (59) absent (2)
join present present absent (84) absent (84) absent (80)
just present present present present absent (2)
last present present absent (58) absent (59) absent (42)
lastElement present present absent (60) absent (61) absent (2)
lastOrError present present absent (60) absent (61) absent (62)
lastOrErrorStage present present absent (63) absent (63) absent (64)
lastStage present present absent (63) absent (63) absent (63)
lift present present present present present
map present present present present absent (28)
mapOptional present present present present absent (28)
materialize present present present present present
merge present present present present present
mergeArray present present present present present
mergeArrayDelayError present present present present present
mergeDelayError present present present present present
mergeWith present present present present present
never present present present present present
observeOn present present present present present
ofType present present present present absent (85)
onBackpressureBuffer present absent (52) absent (52) absent (52) absent (52)
onBackpressureDrop present absent (52) absent (52) absent (52) absent (52)
onBackpressureLatest present absent (52) absent (52) absent (52) absent (52)
onErrorComplete present present present present present
onErrorResumeNext present present present present present
onErrorResumeWith present present present present present
onErrorReturn present present present present present
onErrorReturnItem present present present present present
onTerminateDetach present present present present present
parallel present absent (86) absent (86) absent (86) absent (86)
publish present present absent (87) absent (88) absent (89)
range present present absent (90) absent (90) absent (74)
rangeLong present present absent (90) absent (90) absent (74)
rebatchRequests present absent (52) absent (52) absent (52) absent (52)
reduce present present absent (91) absent (91) absent (92)
reduceWith present present absent (91) absent (91) absent (92)
repeat present present present present present
repeatUntil present present present present present
repeatWhen present present present present present
replay present present absent (87) absent (88) absent (89)
retry present present present present present
retryUntil present present present present present
retryWhen present present present present present
safeSubscribe present present present present present
sample present present absent (60) absent (60) absent (41)
scan present present absent (91) absent (91) absent (92)
scanWith present present absent (91) absent (91) absent (92)
sequenceEqual present present present present present
serialize present present absent (93) absent (93) absent (93)
share present present absent (87) absent (88) absent (89)
single present present absent (58) absent (59) absent (42)
singleElement present present absent (60) absent (61) absent (2)
singleOrError present present absent (60) absent (61) absent (62)
singleOrErrorStage present present absent (63) absent (63) absent (64)
singleStage present present absent (63) absent (63) absent (63)
skip present present absent (60) absent (60) absent (60)
skipLast present present absent (60) absent (60) absent (60)
skipUntil present present absent (94) absent (94) absent (94)
skipWhile present present absent (95) absent (95) absent (2)
sorted present present absent (78) absent (78) absent (78)
startWith present present present present present
startWithArray present present absent (96) absent (96) absent (96)
startWithItem present present absent (97) absent (97) absent (97)
startWithIterable present present absent (98) absent (98) absent (98)
subscribe present present present present present
subscribeOn present present present present present
subscribeWith present present present present present
switchIfEmpty present present present absent (23) absent (99)
switchMap present present absent (100) absent (100) absent (28)
switchMapCompletable present present absent (100) absent (100) absent (28)
switchMapCompletableDelayError present present absent (100) absent (100) absent (28)
switchMapDelayError present present absent (100) absent (100) absent (28)
switchMapMaybe present present absent (100) absent (100) absent (28)
switchMapMaybeDelayError present present absent (100) absent (100) absent (28)
switchMapSingle present present absent (100) absent (100) absent (28)
switchMapSingleDelayError present present absent (100) absent (100) absent (28)
switchOnNext present present present present present
switchOnNextDelayError present present present present present
take present present absent (60) absent (60) absent (60)
takeLast present present absent (60) absent (60) absent (60)
takeUntil present present present present present
takeWhile present present absent (95) absent (95) absent (2)
test present present present present present
throttleFirst present present absent (40) absent (40) absent (41)
throttleLast present present absent (40) absent (40) absent (41)
throttleLatest present present absent (40) absent (40) absent (41)
throttleWithTimeout present present absent (40) absent (40) absent (41)
timeInterval present present present present absent (41)
timeout present present present present present
timer present present present present present
timestamp present present present present absent (41)
to present present present present present
toCompletionStage absent (101) absent (101) present present present
toFlowable absent (102) present present present present
toFuture present present present present present
toList present present absent (13) absent (14) absent (15)
toMap present present absent (13) absent (14) absent (15)
toMaybe absent (103) absent (103) absent (102) present present
toMultimap present present absent (13) absent (14) absent (15)
toObservable present absent (102) present present present
toSingle absent (104) absent (104) present absent (102) present
toSingleDefault absent (105) absent (105) absent (106) absent (102) present
toSortedList present present absent (13) absent (14) absent (15)
unsafeCreate present present present present present
unsubscribeOn present present present present present
using present present present present present
window present present absent (107) absent (108) absent (109)
withLatestFrom present present absent (16) absent (16) absent (17)
wrap absent (110) present present present present
zip present present present present absent (111)
zipArray present present present present absent (112)
zipWith present present present present absent (113)
237 operators 216 210 118 108 84

Notes

1 Use contains().
2 Always empty.
3 Use concatWith.
4 Use blockingFirst(), blockingSingle() or blockingLast().
5 Use blockingGet().
6 At most one element to get. Use blockingGet().
7 No elements to get. Use blockingAwait().
8 Use blockingSubscribe()
9 Use map() and switchIfEmpty() to transform into a list/collection.
10 Use map() to transform into a list/collection.
11 Always empty. Use andThen() to bring in a list/collection.
12 At most one element to store. Use cache().
13 At most one element to collect. Use map() and switchIfEmpty() to transform into a list/collection.
14 One element to collect. Use map() to transform into a list/collection.
15 Always empty. Use andThen() to bring in a collection.
16 At most one element per source. Use zip().
17 Always empty. Use merge().
18 At most one element per source. Use zipArray().
19 Always empty. Use mergeArray().
20 Always empty. Use mergeArrayDelayError().
21 Always empty. Use mergeDelayError().
22 Use empty().
23 Never empty.
24 No items to keep ordered. Use mergeArray().
25 No items to keep ordered. Use mergeArrayDelayError().
26 No items to keep ordered. Use merge().
27 No items to keep ordered. Use mergeDelayError().
28 Always empty thus no items to map.
29 Either the upstream fails (thus no inner) or the mapped-in source, but never both. Use concatMapCompletable.
30 Either the upstream fails (thus no inner) or the mapped-in source, but never both. Use concatMap.
31 At most one item to map. Use concatMap().
32 At most one item. Use flattenAsFlowable or flattenAsObservable.
33 Use concatMap.
34 Either the upstream fails (thus no inner) or the mapped-in source, but never both. Use concatMapMaybe.
35 Use concatMap().
36 Either the upstream fails (thus no inner) or the mapped-in source, but never both. Use concatMapSingle.
37 At most one item. Use flattenStreamAsFlowable or flattenStreamAsObservable.
38 Never empty thus always 1.
39 Always empty thus always 0.
40 At most one item signaled so no subsequent items to work with.
41 Always empty thus no items to work with.
42 Always empty. Use andThen() to chose the follow-up sequence.
43 At most one item, always distinct.
44 Different terminology. Use doAfterSuccess().
45 Different terminology. Use doAfterNext().
46 Different terminology. Use doOnDispose().
47 Always succeeds or fails, there is no onComplete signal.
48 Different terminology. Use doOnCancel().
49 At most one item. Use doOnEvent().
50 Use doOnEach().
51 Different terminology. Use doOnSuccess().
52 Backpressure related and not supported outside Flowable.
53 Different terminology. Use doOnNext().
54 At most one item with index 0. Use defaultIfEmpty.
55 Always one item with index 0.
56 At most one item with index 0. Use toSingle.
57 Use complete().
58 At most one item. Use defaultIfEmpty.
59 Always one item.
60 At most one item, would be no-op.
61 Always one item, would be no-op.
62 Always empty. Use andThen() and error().
63 At most one item. Use toCompletionStage().
64 Always empty. Use andThen(), error() and toCompletionStage().
65 Use flatMap().
66 Not supported. Use flatMap and toFlowable().
67 Use flatMap.
68 Not supported. Use flatMap and toObservable().
69 Use flatMapIterable().
70 Use flatMapStream().
71 Use subscribe().
72 At most one item. Use just() or empty().
73 Always one item. Use just().
74 Always empty. Use complete().
75 Always error.
76 Use wrap().
77 Use fromSupplier().
78 At most one item.
79 Always empty thus no items to group.
80 Always empty thus no items to join.
81 Use ignoreElements().
82 Use ignoreElement().
83 At most one item. Use timer().
84 At most one item. Use zip()
85 Always empty thus no items to filter.
86 Needs backpressure thus not supported outside Flowable.
87 Connectable sources not supported outside Flowable and Observable. Use a MaybeSubject.
88 Connectable sources not supported outside Flowable and Observable. Use a SingleSubject.
89 Connectable sources not supported outside Flowable and Observable. Use a ConnectableSubject.
90 At most one item. Use just().
91 At most one item. Use map().
92 Always empty thus no items to reduce.
93 At most one signal type.
94 At most one item. Use takeUntil().
95 At most one item. Use filter().
96 Use startWith() and fromArray() of Flowable or Observable.
97 Use startWith() and just() of another reactive type.
98 Use startWith() and fromIterable() of Flowable or Observable.
99 Always empty. Use defaultIfEmpty().
100 At most one item. Use flatMap().
101 Use firstStage, lastStage or singleStage.
102 Would be no-op.
103 Use firstElement, lastElement or singleElement.
104 Use firstOrError, lastOrError or singleOrError.
105 Use first, last or single.
106 Use defaultIfEmpty().
107 Use map() and switchIfEmpty() to transform into a nested source.
108 Use map() to transform into a nested source.
109 Always empty. Use andThen() to bring in a nested source.
110 Use fromPublisher().
111 Use merge().
112 Use mergeArray().
113 Use mergeWith().

Under development

Currently, all intended operators are implemented.