Skip to content

Alphabetical List of Observable Operators

DavidMGross edited this page Nov 6, 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
  • 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
  • contains(β€―) β€” determine whether an Observable emits a particular item or not
  • 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
  • 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( ) β€” emit only the first item emitted by an Observable, or the first item that meets some condition
  • firstOrDefault( ) β€” 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
  • from(β€―) β€” convert an Iterable or a Future into an Observable
  • groupBy( ) β€” divide an Observable into a set of Observables that emit groups of items from the original Observable, organized by key
  • 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
  • just(β€―) β€” convert an object into an Observable that emits that object
  • 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
  • merge( ) β€” combine multiple Observables into one
  • mergeDelayError( ) β€” combine multiple Observables into one, allowing error-free Observables to continue before propagating errors
  • never(β€―) β€” create an Observable that emits nothing at all
  • observeOn(β€―) β€” specify on which Scheduler an Observer should observe the Observable
  • ofClass( ) β€” 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
  • 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
  • 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 pairs of items emitted by two Observables
  • skip( ) β€” ignore the first n items emitted by an Observable
  • skipLast( ) β€” ignore the last n items emitted by an Observable
  • skipWhile( ) and skipWhileWithIndex( ) β€” discard items emitted by an Observable until a specified condition is false, then emit the remainder
  • 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
  • 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
  • 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( ) and takeWhileWithIndex( ) β€” emit items emitted by an Observable as long as a specified condition is true, then skip the remainder
  • 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
  • timestamp(β€―) β€” attach a timestamp to every item emitted by an Observable
  • toList(β€―) β€” collect all items from an Observable and emit them as a single List
  • toSortedList(β€―) β€” collect all items from an Observable and emit them as a single, sorted List
  • 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

sidebar

Clone this wiki locally