forked from ReactiveX/RxJava
-
Notifications
You must be signed in to change notification settings - Fork 2
Alphabetical List of Observable Operators
DavidMGross edited this page Dec 17, 2013
·
29 revisions
-
aggregate( )— apply a function to each emitted item, sequentially, and emit only the final accumulated value -
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 -
and( )— combine the emissions from two or more source Observables into aPattern -
average( )— calculates the average of Integers emitted by an Observable and emits this average -
averageDoubles( )— calculates the average of Doubles emitted by an Observable and emits this average -
averageFloats( )— calculates the average of Floats emitted by an Observable and emits this average -
averageLongs( )— calculates the average of Longs emitted by an Observable and emits this average -
buffer( )— periodically gather items from an Observable into bundles and emit these bundles rather than emitting the items one at a time -
cache( )— remember the sequence of items emitted by the Observable and emit the same sequence to future Observers -
cast( )— cast all items from the source Observable into a particular type before reemitting them -
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 -
concat( )— concatenate two or more Observables sequentially -
connect( )— instructs a Connectable Observable to begin emitting items -
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 -
create( )— create an Observable from scratch by means of a function -
debounce( )— only emit an item from the source Observable after a particular timespan has passed without the Observable emitting any other items -
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 an Observer subscribes; create a fresh Observable on each subscription -
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 -
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 -
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 -
error( )— create an Observable that emits nothing and then signals an error -
exists( )— determine whether an Observable emits any items or not -
filter( )— filter items emitted by an Observable -
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 -
flatMap( )— transform the items emitted by an Observable into Observables, then flatten this into a single Observable -
forEach( )— invoke a function on each item emitted by the Observable; block until the Observable completes -
from( )— convert an Iterable or a Future into an Observable -
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 -
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 -
groupByUntil( )— divide an Observable into a set of Observables that emit groups of items from the original Observable, organized by key, and opening a new set periodically -
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 -
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 -
isEmpty( )— determine whether an Observable emits any items or not -
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 -
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 -
lastOrDefault( )— block until the Observable completes, then return the last item emitted by the Observable or a default item if there is no last item -
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 -
longCount( )— counts the number of items emitted by an Observable and emits this count -
map( )— transform the items emitted by an Observable by applying a function to each of them -
mapMany( )— transform the items emitted by an Observable into Observables, then flatten this into a single Observable -
mapManyDelayError( )— transform the items emitted by an Observable into Observables, then flatten this into a single Observable, waiting to report errors until all error-free observables have a chance to complete -
mapWithIndex( )— transform the items emitted by an Observable by applying a function to each of them that takes into account the index value of the item -
materialize( )— convert an Observable into a list of Notifications -
max( )— emits the maximum value emitted by a source Observable -
maxBy( )— emits the item emitted by the source Observable that has the maximum key value -
merge( )— combine multiple Observables into one -
mergeDelayError( )— combine multiple Observables into one, allowing error-free Observables to continue before propagating errors -
min( )— emits the minimum value emitted by a source Observable -
minBy( )— emits the item emitted by the source Observable that has the minimum key value -
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 -
observeOn( )— specify on which Scheduler an Observer should observe the Observable -
ofType( )— emit only those items from the source Observable that are of a particular class -
onErrorResumeNext( )— instructs an Observable to continue emitting items after it encounters an error -
onErrorReturn( )— instructs an Observable to emit a particular item when it encounters an error -
onExceptionResumeNextViaObservable( )— instructs an Observable to continue emitting items after it encounters an exception (but not another variety of throwable) -
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 -
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 -
refCount( )— makes a Connectable Observable behave like an ordinary Observable -
repeat( )— create an Observable that emits a particular item or sequence of items repeatedly -
replay( )— ensures that all Observers see the same sequence of emitted items, even if they subscribe after the Observable begins emitting the items -
retry( )— if a source Observable emits an error, resubscribe to it in the hopes that it will complete without error -
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 -
sequenceEqual( )— test the equality of sequences emitted by two Observables -
single( )— if the Observable completes after emitting a single item, return that item, otherwise throw an exception -
singleOrDefault( )— if the Observable completes after emitting a single item, return that item, otherwise return a default item -
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 -
skipWhileWithIndex( )— discard items emitted by an Observable until a specified condition is false, then emit the remainder -
start( )— create an Observable that emits the return value of a function -
startWith( )— emit a specified sequence of items before beginning to emit the items from the Observable -
subscribeOn( )— specify which Scheduler an Observable should use when its subscription is invoked -
sum( )— adds the Integers emitted by an Observable and emits this sum -
sumDoubles( )— adds the Doubles emitted by an Observable and emits this sum -
sumFloats( )— adds the Floats emitted by an Observable and emits this sum -
sumLongs( )— adds the Longs emitted by an Observable and emits this sum -
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( )— force an Observable to make synchronous calls and to be well-behaved -
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 -
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 -
takeWhileWithIndex( )— emit items emitted by an Observable as long as a specified condition is true, then skip the remainder -
then( )— transform a series ofPatternobjects via aPlantemplate -
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 -
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 into an Observable that executes the function and emits its return value -
toBlockingObservable( )— transform an Observable into a BlockingObservable -
toFuture( )— convert the Observable into a Future -
toIterable( )— convert the sequence emitted by the Observable into an Iterable -
toIterator( )— convert the sequence emitted by the Observable into an Iterator -
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 -
toSortedList( )— collect all items from an Observable and emit them as a single, sorted List -
using( )— create a disposable resource that has the same lifespan as an Observable -
when( )— convert a series ofPlanobjects into an Observable -
where( )— filter items emitted by an Observable -
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
A Netflix Original Production
Tech Blog | Twitter @NetflixOSS | Twitter @RxJava | Jobs