- Notifications
You must be signed in to change notification settings - Fork7.6k
Observable Utility Operators
David Karnok edited this pageMay 8, 2018 ·93 revisions
This page lists various utility operators for working with Observables.
materialize( )— convert an Observable into a list of Notificationsdematerialize( )— convert a materialized Observable back into its non-materialized formtimestamp( )— attach a timestamp to every item emitted by an Observableserialize( )— force an Observable to make serialized calls and to be well-behavedcache( )— remember the sequence of items emitted by the Observable and emit the same sequence to future SubscribersobserveOn( )— specify on which Scheduler a Subscriber should observe the ObservablesubscribeOn( )— specify which Scheduler an Observable should use when its subscription is invokeddoOnEach( )— register an action to take whenever an Observable emits an itemdoOnNext( )— register an action to call just before the Observable passes anonNextevent along to its downstreamdoAfterNext( )— register an action to call after the Observable has passed anonNextevent along to its downstreamdoOnCompleted( )— register an action to take when an Observable completes successfullydoOnError( )— register an action to take when an Observable completes with an errordoOnTerminate( )— register an action to call just before an Observable terminates, either successfully or with an errordoAfterTerminate( )— register an action to call just after an Observable terminated, either successfully or with an errordoOnSubscribe( )— register an action to take when an observer subscribes to an Observable- 1.x
doOnUnsubscribe( )— register an action to take when an observer unsubscribes from an Observable finallyDo( )— register an action to take when an Observable completesdoFinally( )— register an action to call when an Observable terminates or it gets disposeddelay( )— shift the emissions from an Observable forward in time by a specified amountdelaySubscription( )— hold an Subscriber's subscription request for a specified amount of time before passing it on to the source ObservabletimeInterval( )— emit the time lapsed between consecutive emissions of a source Observableusing( )— create a disposable resource that has the same lifespan as an Observablesingle( )— if the Observable completes after emitting a single item, return that item, otherwise throw an exceptionsingleOrDefault( )— if the Observable completes after emitting a single item, return that item, otherwise return a default itemrepeat( )— create an Observable that emits a particular item or sequence of items repeatedlyrepeatWhen( )— create an Observable that emits a particular item or sequence of items repeatedly, depending on the emissions of a second Observable
Copyright (c) 2016-present, RxJava Contributors.
Twitter @RxJava |Gitter @RxJava