Repository navigation
Alphabetical List of Observable Operators
akarnokd edited this page Jun 5, 2019
·
142 revisions
-
aggregate(β)β seereduce(β) -
all(β―)β determine whether all items emitted by an Observable meet some criteria -
amb(β)β given two or more source Observables, emits all of the items from the first of these Observables to emit an item -
ambWith(β)β instance version ofamb(β) -
and(β)β combine the emissions from two or more source Observables into aPattern(rxjava-joins) -
apply(β)(scala) β seecreate(β―) -
asObservable(β)(kotlin) β seefrom(β―)(et al.) -
asyncAction(β―)β convert an Action into an Observable that executes the Action and emits its return value (rxjava-async) -
asyncFunc(β―)β convert a function into an Observable that executes the function and emits its return value (rxjava-async) -
averageDouble(β―)β calculates the average of Doubles emitted by an Observable and emits this average (rxjava-math) -
averageFloat(β―)β calculates the average of Floats emitted by an Observable and emits this average (rxjava-math) -
averageInteger(β―)β calculates the average of Integers emitted by an Observable and emits this average (rxjava-math) -
averageLong(β―)β calculates the average of Longs emitted by an Observable and emits this average (rxjava-math) -
blocking(β)(clojure) β seetoBlocking(β) -
buffer(β)β periodically gather items from an Observable into bundles and emit these bundles rather than emitting the items one at a time -
byLine(β)(StringObservable) β converts an Observable of Strings into an Observable of Lines by treating the source sequence as a stream and splitting it on line-endings -
cache(β―)β remember the sequence of items emitted by the Observable and emit the same sequence to future Subscribers -
cast(β)β cast all items from the source Observable into a particular type before reemitting them -
catch(β)(clojure) β seeonErrorResumeNext(β―) -
chunkify(β)β returns an iterable that periodically returns a list of items emitted by the source Observable since the last list (β) -
collect(β)β collects items emitted by the source Observable into a single mutable data structure and returns an Observable that emits this structure -
combineLatest(β)β when an item is emitted by either of two Observables, combine the latest item emitted by each Observable via a specified function and emit items based on the results of this function -
combineLatestWith(β)(scala) β instance version ofcombineLatest(β) -
concat(β)β concatenate two or more Observables sequentially -
concatMap(β)β transform the items emitted by an Observable into Observables, then flatten this into a single Observable, without interleaving -
concatWith(β)β instance version ofconcat(β) -
connect(β―)β instructs a Connectable Observable to begin emitting items -
cons(β)(clojure) β seeconcat(β) -
contains(β―)β determine whether an Observable emits a particular item or not -
count(β―)β counts the number of items emitted by an Observable and emits this count -
countLong(β―)β counts the number of items emitted by an Observable and emits this count -
create(β―)β create an Observable from scratch by means of a function -
cycle(β)(clojure) β seerepeat(β―) -
debounce(β)β only emit an item from the source Observable after a particular timespan has passed without the Observable emitting any other items -
decode(β)(StringObservable) β convert a stream of multibyte characters into an Observable that emits byte arrays that respect character boundaries -
defaultIfEmpty(β)β emit items from the source Observable, or emit a default item if the source Observable completes after emitting no items -
defer(β―)β do not create the Observable until a Subscriber subscribes; create a fresh Observable on each subscription -
deferFuture(β―)β convert a Future that returns an Observable into an Observable, but do not attempt to get the Observable that the Future returns until a Subscriber subscribes (rxjava-async) -
deferCancellableFuture(β―)β convert a Future that returns an Observable into an Observable in a way that monitors the subscription status of the Observable to determine whether to halt work on the Future, but do not attempt to get the returned Observable until a Subscriber subscribes (β)(rxjava-async) -
delay(β―)β shift the emissions from an Observable forward in time by a specified amount -
dematerialize(β―)β convert a materialized Observable back into its non-materialized form -
distinct(β)β suppress duplicate items emitted by the source Observable -
distinctUntilChanged(β)β suppress duplicate consecutive items emitted by the source Observable -
do(β)(clojure) β seedoOnEach(β―) -
doOnCompleted(β―)β register an action to take when an Observable completes successfully -
doOnEach(β―)β register an action to take whenever an Observable emits an item -
doOnError(β―)β register an action to take when an Observable completes with an error -
doOnNext(β)β seedoOnEach(β―) -
doOnRequest(β)β register an action to take when items are requested from an Observable via reactive-pull backpressure (β) -
doOnSubscribe(β―)β register an action to take when an observer subscribes to an Observable -
doOnTerminate(β―)β register an action to take when an Observable completes, either successfully or with an error -
doOnUnsubscribe(β―)β register an action to take when an observer unsubscribes from an Observable -
doWhile(β―)β emit the source Observable's sequence, and then repeat the sequence as long as a condition remains true (contrib-computation-expressions) -
drop(β)(scala/clojure) β seeskip(β) -
dropRight(β)(scala) β seeskipLast(β) -
dropUntil(β)(scala) β seeskipUntil(β) -
dropWhile(β)(scala) β seeskipWhile(β) -
drop-while(β)(clojure) β seeskipWhile(β) -
elementAt(β)β emit item n emitted by the source Observable -
elementAtOrDefault(β)β emit item n emitted by the source Observable, or a default item if the source Observable emits fewer than n items -
empty(β―)β create an Observable that emits nothing and then completes -
encode(β)(StringObservable) β transform an Observable that emits strings into an Observable that emits byte arrays that respect character boundaries of multibyte characters in the original strings -
error(β―)β create an Observable that emits nothing and then signals an error -
every(β)(clojure) β seeall(β―) -
exists(β―)β determine whether an Observable emits any items or not -
filter(β)β filter items emitted by an Observable -
finally(β)(clojure) β seefinallyDo(β―) -
filterNot(β)(scala) β seefilter(β) -
finallyDo(β―)β register an action to take when an Observable completes -
first(β)(Observable) β emit only the first item emitted by an Observable, or the first item that meets some condition -
first(β)(BlockingObservable) β emit only the first item emitted by an Observable, or the first item that meets some condition -
firstOrDefault(β)(Observable) β emit only the first item emitted by an Observable, or the first item that meets some condition, or a default value if the source Observable is empty -
firstOrDefault(β)(BlockingObservable) β emit only the first item emitted by an Observable, or the first item that meets some condition, or a default value if the source Observable is empty -
firstOrElse(β)(scala) β seefirstOrDefault(β)orfirstOrDefault(β)(BlockingObservable) -
flatMap(β)β transform the items emitted by an Observable into Observables, then flatten this into a single Observable -
flatMapIterable(β)β create Iterables corresponding to each emission from a source Observable and merge the results into a single Observable -
flatMapIterableWith(β)(scala) β instance version offlatMapIterable(β) -
flatMapWith(β)(scala) β instance version offlatmap(β) -
flatten(β)(scala) β seemerge(β) -
flattenDelayError(β)(scala) β seemergeDelayError(β) -
foldLeft(β)(scala) β seereduce(β) -
forall(β)(scala) β seeall(β―) -
forEach(β)(Observable) β seesubscribe(β) -
forEach(β)(BlockingObservable) β invoke a function on each item emitted by the Observable; block until the Observable completes -
forEachFuture(β―)(Async) β pass Subscriber methods to an Observable but also have it behave like a Future that blocks until it completes (rxjava-async) -
forEachFuture(β)(BlockingObservable)β create a futureTask that will invoke a specified function on each item emitted by an Observable (β) -
forIterable(β―)β apply a function to the elements of an Iterable to create Observables which are then concatenated (β) -
from(β―)β convert an Iterable, a Future, or an Array into an Observable -
from(β)(StringObservable) β convert a stream of characters or a Reader into an Observable that emits byte arrays or Strings -
fromAction(β―)β convert an Action into an Observable that invokes the action and emits its result when a Subscriber subscribes (rxjava-async) -
fromCallable(β―)β convert a Callable into an Observable that invokes the callable and emits its result or exception when a Subscriber subscribes (rxjava-async) -
fromCancellableFuture(β―)β convert a Future into an Observable in a way that monitors the subscription status of the Observable to determine whether to halt work on the Future, but do not attempt to get the Future's value until a Subscriber subscribes (β)(rxjava-async) -
fromFunc0(β)β seefromCallable(β―)(rxjava-async) -
fromFuture(β―)β convert a Future into an Observable, but do not attempt to get the Future's value until a Subscriber subscribes (β) -
fromRunnable(β―)β convert a Runnable into an Observable that invokes the runable and emits its result when a Subscriber subscribes (rxjava-async) -
generate(β―)β create an Observable that emits a sequence of items as generated by a function of your choosing (β) -
generateAbsoluteTime(β―)β create an Observable that emits a sequence of items as generated by a function of your choosing, with each item emitted at an item-specific time (β) -
generator(β)(clojure) β seegenerate(β―) -
getIterator(β)β convert the sequence emitted by the Observable into an Iterator -
groupBy(β)β divide an Observable into a set of Observables that emit groups of items from the original Observable, organized by key -
group-by(β)(clojure) β seegroupBy(β) -
groupByUntil(β)β a variant of thegroupBy(β)operator that closes any open GroupedObservable upon a signal from another Observable (β) -
groupJoin(β)β combine the items emitted by two Observables whenever one item from one Observable falls within a window of duration specified by an item emitted by the other Observable -
head(β)(scala) β seefirst(β)(BlockingObservable) -
headOption(β)(scala) β seefirstOrDefault(β)orfirstOrDefault(β)(BlockingObservable) -
headOrElse(β)(scala) β seefirstOrDefault(β)orfirstOrDefault(β)(BlockingObservable) -
ifThen(β―)β only emit the source Observable's sequence if a condition is true, otherwise emit an empty or default sequence (contrib-computation-expressions) -
ignoreElements(β)β discard the items emitted by the source Observable and only pass through the error or completed notification -
interval(β―)β create an Observable that emits a sequence of integers spaced by a given time interval -
into(β)(clojure) β seereduce(β) -
isEmpty(β―)β determine whether an Observable emits any items or not -
items(β)(scala) β seejust(β―) -
join(β)β combine the items emitted by two Observables whenever one item from one Observable falls within a window of duration specified by an item emitted by the other Observable -
join(β)(StringObservable) β converts an Observable that emits a sequence of strings into an Observable that emits a single string that concatenates them all, separating them by a specified string -
just(β―)β convert an object into an Observable that emits that object -
last(β)(BlockingObservable) β block until the Observable completes, then return the last item emitted by the Observable -
last(β)(Observable) β emit only the last item emitted by the source Observable -
lastOption(β)(scala) β seelastOrDefault(β)orlastOrDefault(β)(BlockingObservable) -
lastOrDefault(β)(BlockingObservable) β block until the Observable completes, then return the last item emitted by the Observable or a default item if there is no last item -
lastOrDefault(β)(Observable) β emit only the last item emitted by an Observable, or a default value if the source Observable is empty -
lastOrElse(β)(scala) β seelastOrDefault(β)orlastOrDefault(β)(BlockingObservable) -
latest(β)β returns an iterable that blocks until or unless the Observable emits an item that has not been returned by the iterable, then returns the latest such item -
length(β)(scala) β seecount(β―) -
limit(β)β seetake(β) -
longCount(β―)(scala) β seecountLong(β―) -
map(β)β transform the items emitted by an Observable by applying a function to each of them -
mapcat(β)(clojure) β seeconcatMap(β) -
mapMany(β)β see:flatMap(β) -
materialize(β―)β convert an Observable into a list of Notifications -
max(β―)β emits the maximum value emitted by a source Observable (rxjava-math) -
maxBy(β―)β emits the item emitted by the source Observable that has the maximum key value (rxjava-math) -
merge(β)β combine multiple Observables into one -
mergeDelayError(β)β combine multiple Observables into one, allowing error-free Observables to continue before propagating errors -
merge-delay-error(β)(clojure) β seemergeDelayError(β) -
mergeMap(β)* β see:flatMap(β) -
mergeMapIterable(β)β see:flatMapIterable(β) -
mergeWith(β)β instance version ofmerge(β) -
min(β―)β emits the minimum value emitted by a source Observable (rxjava-math) -
minBy(β―)β emits the item emitted by the source Observable that has the minimum key value (rxjava-math) -
mostRecent(β)β returns an iterable that always returns the item most recently emitted by the Observable -
multicast(β―)β represents an Observable as a Connectable Observable -
never(β―)β create an Observable that emits nothing at all -
next(β)β returns an iterable that blocks until the Observable emits another item, then returns that item -
nonEmpty(β)(scala) β seeisEmpty(β―) -
nth(β)(clojure) β seeelementAt(β)andelementAtOrDefault(β) -
observeOn(β―)β specify on which Scheduler a Subscriber should observe the Observable -
ofType(β)β emit only those items from the source Observable that are of a particular class -
onBackpressureBlock(β)β block the Observable's thread until the Observer is ready to accept more items from the Observable (β) -
onBackpressureBuffer(β)β maintain a buffer of all emissions from the source Observable and emit them to downstream Subscribers according to the requests they generate -
onBackpressureDrop(β)β drop emissions from the source Observable unless there is a pending request from a downstream Subscriber, in which case emit enough items to fulfill the request -
onErrorFlatMap(β―)β instructs an Observable to emit a sequence of items whenever it encounters an error (β) -
onErrorResumeNext(β―)β instructs an Observable to emit a sequence of items if it encounters an error -
onErrorReturn(β―)β instructs an Observable to emit a particular item when it encounters an error -
onExceptionResumeNext(β―)β instructs an Observable to continue emitting items after it encounters an exception (but not another variety of throwable) -
orElse(β)(scala) β seedefaultIfEmpty(β) -
parallel(β―)β split the work done on the emissions from an Observable into multiple Observables each operating on its own parallel thread (β) -
parallelMerge(β)β combine multiple Observables into smaller number of Observables (β) -
pivot(β)β combine multiple sets of grouped observables so that they are arranged primarily by group rather than by set (β) -
publish(β―)β represents an Observable as a Connectable Observable -
publishLast(β―)β represent an Observable as a Connectable Observable that emits only the last item emitted by the source Observable (β) -
range(β―)β create an Observable that emits a range of sequential integers -
reduce(β)β apply a function to each emitted item, sequentially, and emit only the final accumulated value -
reductions(β)(clojure) β seescan(β) -
refCount(β―)β makes a Connectable Observable behave like an ordinary Observable -
repeat(β―)β create an Observable that emits a particular item or sequence of items repeatedly -
repeatWhen(β―)β create an Observable that emits a particular item or sequence of items repeatedly, depending on the emissions of a second Observable -
replay(β―)β ensures that all Subscribers see the same sequence of emitted items, even if they subscribe after the Observable begins emitting the items -
rest(β)(clojure) β seenext(β) -
return(β)(clojure) β seejust(β―) -
retry(β―)β if a source Observable emits an error, resubscribe to it in the hopes that it will complete without error -
retrywhen(β―)β if a source Observable emits an error, pass that error to another Observable to determine whether to resubscribe to the source -
runAsync(β―)β returns aStoppableObservablethat emits multiple actions as generated by a specified Action on a Scheduler (rxjava-async) -
sample(β)β emit the most recent items emitted by an Observable within periodic time intervals -
scan(β)β apply a function to each item emitted by an Observable, sequentially, and emit each successive value -
seq(β)(clojure) β seegetIterator(β) -
sequenceEqual(β―)β test the equality of sequences emitted by two Observables -
sequenceEqualWith(β)(scala) β instance version ofsequenceEqual(β―) -
serialize(β―)β force an Observable to make serialized calls and to be well-behaved -
share(β)β seerefCount(β―) -
single(β)(BlockingObservable) β if the source Observable completes after emitting a single item, return that item, otherwise throw an exception -
single(β)(Observable) β if the source Observable completes after emitting a single item, emit that item, otherwise notify of an exception -
singleOption(β)(scala) β seesingleOrDefault(β)(BlockingObservable) -
singleOrDefault(β)(BlockingObservable) β if the source Observable completes after emitting a single item, return that item, otherwise return a default item -
singleOrDefault(β)(Observable) β if the source Observable completes after emitting a single item, emit that item, otherwise emit a default item -
singleOrElse(β)(scala) β seesingleOrDefault(β) -
size(β)(scala) β seecount(β―) -
skip(β)β ignore the first n items emitted by an Observable -
skipLast(β)β ignore the last n items emitted by an Observable -
skipUntil(β)β discard items emitted by a source Observable until a second Observable emits an item, then emit the remainder of the source Observable's items -
skipWhile(β)β discard items emitted by an Observable until a specified condition is false, then emit the remainder -
sliding(β)(scala) β seewindow(β) -
slidingBuffer(β)(scala) β seebuffer(β) -
split(β)(StringObservable) β converts an Observable of Strings into an Observable of Strings that treats the source sequence as a stream and splits it on a specified regex boundary -
start(β―)β create an Observable that emits the return value of a function (rxjava-async) -
startCancellableFuture(β―)β convert a function that returns Future into an Observable that emits that Future's return value in a way that monitors the subscription status of the Observable to determine whether to halt work on the Future (β)(rxjava-async) -
startFuture(β―)β convert a function that returns Future into an Observable that emits that Future's return value (rxjava-async) -
startWith(β)β emit a specified sequence of items before beginning to emit the items from the Observable -
stringConcat(β)(StringObservable) β converts an Observable that emits a sequence of strings into an Observable that emits a single string that concatenates them all -
subscribeOn(β―)β specify which Scheduler an Observable should use when its subscription is invoked -
sumDouble(β―)β adds the Doubles emitted by an Observable and emits this sum (rxjava-math) -
sumFloat(β―)β adds the Floats emitted by an Observable and emits this sum (rxjava-math) -
sumInt(β―)β adds the Integers emitted by an Observable and emits this sum (rxjava-math) -
sumLong(β―)β adds the Longs emitted by an Observable and emits this sum (rxjava-math) -
switch(β)(scala) β seeswitchOnNext(β) -
switchCase(β)β emit the sequence from a particular Observable based on the results of an evaluation (contrib-computation-expressions) -
switchMap(β)β transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable -
switchOnNext(β)β convert an Observable that emits Observables into a single Observable that emits the items emitted by the most-recently emitted of those Observables -
synchronize(β―)β seeserialize(β―) -
take(β)β emit only the first n items emitted by an Observable -
takeFirst(β)β emit only the first item emitted by an Observable, or the first item that meets some condition -
takeLast(β)β only emit the last n items emitted by an Observable -
takeLastBuffer(β)β emit the last n items emitted by an Observable, as a single list item -
takeRight(β)(scala) β seelast(β)(Observable) ortakeLast(β) -
takeUntil(β)β emits the items from the source Observable until a second Observable emits an item -
takeWhile(β)β emit items emitted by an Observable as long as a specified condition is true, then skip the remainder -
take-while(β)(clojure) β seetakeWhile(β) -
then(β)β transform a series ofPatternobjects via aPlantemplate (rxjava-joins) -
throttleFirst(β)β emit the first items emitted by an Observable within periodic time intervals -
throttleLast(β)β emit the most recent items emitted by an Observable within periodic time intervals -
throttleWithTimeout(β)β only emit an item from the source Observable after a particular timespan has passed without the Observable emitting any other items -
throw(β)(clojure) β seeerror(β―) -
timeInterval(β―)β emit the time lapsed between consecutive emissions of a source Observable -
timeout(β)β emit items from a source Observable, but issue an exception if no item is emitted in a specified timespan -
timer(β)β create an Observable that emits a single item after a given delay -
timestamp(β―)β attach a timestamp to every item emitted by an Observable -
toAsync(β―)β convert a function or Action into an Observable that executes the function and emits its return value (rxjava-async) -
toBlocking(β)β transform an Observable into a BlockingObservable -
toBlockingObservable(β)- seetoBlocking(β) -
toFuture(β)β convert the Observable into a Future -
toIterable(β)β convert the sequence emitted by the Observable into an Iterable -
toIterator(β)β seegetIterator(β) -
toList(β―)β collect all items from an Observable and emit them as a single List -
toMap(β―)β convert the sequence of items emitted by an Observable into a map keyed by a specified key function -
toMultimap(β―)β convert the sequence of items emitted by an Observable into an ArrayList that is also a map keyed by a specified key function -
toSeq(β)(scala) β seetoList(β―) -
toSortedList(β―)β collect all items from an Observable and emit them as a single, sorted List -
tumbling(β)(scala) β seewindow(β) -
tumblingBuffer(β)(scala) β seebuffer(β) -
using(β―)β create a disposable resource that has the same lifespan as an Observable -
when(β)β convert a series ofPlanobjects into an Observable (rxjava-joins) -
where(β)β see:filter(β) -
whileDo(β―)β if a condition is true, emit the source Observable's sequence and then repeat the sequence as long as the condition remains true (contrib-computation-expressions) -
window(β)β periodically subdivide items from an Observable into Observable windows and emit these windows rather than emitting the items one at a time -
zip(β)β combine sets of items emitted by two or more Observables together via a specified function and emit items based on the results of this function -
zipWith(β)β instance version ofzip(β) -
zipWithIndex(β)(scala) β seezip(β) -
++(scala) β seeconcat(β) -
+:(scala) β seestartWith(β)
(β) β this proposed operator is not part of RxJava 1.0
Copyright (c) 2016-present, RxJava Contributors.
Twitter @RxJava | Gitter @RxJava