Operators that allow composing Observables to transform and manipulate data in an asynchronous, functional and thread-safe manner.
The operators are all exposed via the ObservableExtensions class
| Modifier and Type | Class and Description |
|---|---|
| public class | BackpressureUtils
Utility functions for use with backpressure. |
| public class | BlockingOperatorLatest
Wait for and iterate over the latest values of the source observable. |
| public class | BlockingOperatorMostRecent
Returns an Iterable that always returns the item most recently emitted by an Observable, or a seed value if no item has yet been emitted. |
| public class | BlockingOperatorNext
Returns an Iterable that blocks until the Observable emits another item, then returns that item. |
| public class | BlockingOperatorToFuture
Returns a Future representing the single value emitted by an Observable. |
| public class | BlockingOperatorToIterator
Returns an Iterator that iterates over all items emitted by a specified Observable. |
| public class | BufferUntilSubscriber<
the type of the items to be buffered T>A solution to the "time gap" problem that occurs with |
| public class | CachedObservable<
the source element type T>An observable which auto-connects to another observable, caches the elements from that observable but allows terminating the connection and completing the cache. |
| public class | |
| public class | CompletableFromEmitter
Allows push-based emission of terminal events to a CompletableSubscriber. |
| public class | |
| public class | |
| public class | |
| public class | |
| public class | |
| public class | |
| public class | |
| public class | |
| public class | |
| public abstract class | DeferredScalarSubscriber<
the source value type T, the result value type R>Base class for Subscribers that consume the entire upstream and signal zero or one element (or an error) in a backpressure honoring fashion. |
| public abstract class | DeferredScalarSubscriberSafe<
source value type T, result value type R>Supplements |
| public class | NotificationLite
For use in internal operators that need something like materialize and dematerialize wholly within the
implementation of the operator but don't want to incur the allocation cost of actually creating
|
| public class | OnSubscribeAmb<
the value type T>Given multiple |
| public class | OnSubscribeAutoConnect<
the value type of the chain T>Wraps a ConnectableObservable and calls its connect() method once the specified number of Subscribers have subscribed. |
| public class | |
| public class | |
| public class | OnSubscribeConcatMap<
the source value type T, the output value type R>Maps a source sequence into Observables and concatenates them in order, subscribing to one at a time. |
| public class | |
| public class | OnSubscribeDefer<
the value type T>Do not create the Observable until an Observer subscribes; create a fresh Observable on each subscription. |
| public class | OnSubscribeDelaySubscription<
the value type T>Delays the subscription to the source by the given amount, running on the given scheduler. |
| public class | OnSubscribeDelaySubscriptionOther<
the main type T, the other value type, ignored U>Delays the subscription to the main source until the other observable fires an event or completes. |
| public class | OnSubscribeDelaySubscriptionWithSelector<
the value type T, the value type of the Observable triggering the delayed subscription U>Delays the subscription until the Observable emits an event. |
| public class | OnSubscribeDetach<
the value type T>Nulls out references to upstream data structures when the source terminates or the child unsubscribes. |
| public class | |
| public class | OnSubscribeFilter<
the value type T>Filters an Observable by discarding any items it emits that do not meet some test. |
| public class | OnSubscribeFlatMapCompletable<
the upstream value type T>Maps upstream values to Completables and merges them, up to a given number of them concurrently, optionally delaying errors. |
| public class | OnSubscribeFlatMapSingle<
the upstream value type T, the inner Singles and result value type R>Maps upstream values to Singles and merges them, up to a given number of them concurrently, optionally delaying errors. |
| public class | OnSubscribeFlattenIterable<
the input value type T, the output value type R>Flattens a sequence if Iterable sources, generated via a function, into a single sequence. |
| public class | |
| public class | OnSubscribeFromCallable<
the value type emitted T>Do not invoke the function until an Observer subscribes; Invokes function on each subscription. |
| public class | OnSubscribeFromIterable<
the value type of the items T>Converts an |
| public class | OnSubscribeGroupJoin<
the left value type T1, the right value type T2, the value type of the left duration D1, the value type of the right duration D2, the result value type R>Correlates two sequences when they overlap and groups the results. |
| public class | OnSubscribeJoin<
the left value type TLeft, the right value type TRight, the left duration value type TLeftDuration, the right duration type TRightDuration, the result type R>Correlates the elements of two sequences based on overlapping durations. |
| public class | OnSubscribeLift<
the source value type T, the result value type R>Transforms the downstream Subscriber into a Subscriber via an operator callback and calls the parent OnSubscribe.call() method with it. |
| public class | OnSubscribeMap<
the input value type T, the return value type R>Applies a function of your choosing to every item emitted by an |
| public class | OnSubscribeOnAssembly<
the value type T>Captures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception. |
| public class | OnSubscribeOnAssemblyCompletable<
the value type T>Captures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception. |
| public class | OnSubscribeOnAssemblySingle<
the value type T>Captures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception. |
| public class | OnSubscribePublishMulticast<
the input and output type T>Multicasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode. |
| public class | OnSubscribeRange
Emit integers from start to end inclusive. |
| public class | |
| public class | |
| public class | |
| public class | OnSubscribeRefCount<
the value type T>Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. |
| public class | OnSubscribeSingle<
the value type T>Allows conversion of an Observable to a Single ensuring that exactly one item is emitted - no more and no less. |
| public class | |
| public class | OnSubscribeSwitchIfEmpty<
the value type T>If the Observable completes without emitting any items, subscribe to an alternate Observable. |
| public class | |
| public class | OnSubscribeThrow<
the type of item (ostensibly) emitted by the Observable T>An Observable that invokes |
| public class | OnSubscribeTimeoutSelectorWithFallback<
the input and output value type T, the value type of the first timeout Observable U, the value type of the item-based timeout Observable V>Switches to the fallback Observable if: the first upstream item doesn't arrive before the first timeout Observable signals an item or completes; or the Observable generated from the previous upstream item signals its item or completes before the upstream signals the next item of its own. |
| public class | OnSubscribeTimeoutTimedWithFallback<
the value type T>Switches to consuming a fallback Observable if the main source doesn't signal an onNext event within the given time frame after subscription or the previous onNext event. |
| public class | OnSubscribeTimerOnce
Timer that emits a single 0L and completes after the specified time. |
| public class | OnSubscribeTimerPeriodically
Emit 0L after the initial period and ever increasing number after each period. |
| public class | OnSubscribeToMap<
the value type of the input T, the map-key type K, the map-value type V>Maps the elements of the source observable into a java.util.Map instance and emits that once the source observable completes. |
| public class | OnSubscribeToMultimap<
the value type of the input T, the multimap-key type K, the multimap-value type V>Maps the elements of the source observable into a multimap (Map<K, Collection<V>>) where each key entry has a collection of the source's values. |
| public class | OnSubscribeToObservableFuture
Converts a |
| public class | OnSubscribeUsing<
the output value type T, the resource type Resource>Constructs an observable sequence that depends on a resource object. |
| public class | OperatorAll<
the value type T>Returns an Observable that emits a Boolean that indicates whether all items emitted by an Observable satisfy a condition. |
| public class | OperatorAny<
the input value type T>Returns an |
| public class | OperatorAsObservable<
the return value type of the wrapped observable. T>Hides the identity of another observable. |
| public class | OperatorBufferWithSingleObservable<
the buffered value type T, the value type of the Observable signaling the end of each buffer TClosing>This operation takes
values from the specified |
| public class | OperatorBufferWithSize<
the buffered value type T>This operation takes
values from the specified |
| public class | OperatorBufferWithStartEndObservable<
the buffered value type T, the value type of the Observable opening buffers TOpening, the value type of the Observable closing buffers TClosing>This operation takes
values from the specified |
| public class | OperatorBufferWithTime<
the buffered value type T>This operation takes
values from the specified |
| public class | OperatorCast<
the input value type T, the output value type R>Converts the elements of an observable sequence to the specified type. |
| public class | OperatorDebounceWithSelector<
the value type of the main sequence T, the value type of the boundary sequence U>Delay the emission via another observable if no new source appears in the meantime. |
| public class | OperatorDebounceWithTime<
the value type T>This operation filters out events which are published too quickly in succession. |
| public class | |
| public class | OperatorDelayWithSelector<
the item type T, the value type of the item-delaying observable V>Delay the subscription and emission of the source items by a per-item observable that fires its first element. |
| public class | OperatorDematerialize<
the wrapped value type T>Reverses the effect of |
| public class | OperatorDistinct<
the value type T, the key type U>Returns an Observable that emits all distinct items emitted by the source. |
| public class | OperatorDistinctUntilChanged<
the value type T, the key type U>Returns an Observable that emits all sequentially distinct items emitted by the source. |
| public class | OperatorDoAfterTerminate<
the value type T>Registers an action to be called after an Observable invokes |
| public class | OperatorDoOnRequest<
The type of the elements in the T>rx. that this operator modifiesThis operator modifies an |
| public class | OperatorDoOnSubscribe<
The type of the elements in the T>rx. that this operator modifiesThis operator modifies an |
| public class | OperatorDoOnUnsubscribe<
The type of the elements in the T>rx. that this operator modifiesThis operator modifies an |
| public class | |
| public class | |
| public class | OperatorGroupBy<
the source and group value type T, the key type K, the value type of the groups V>
Deprecated
since 1.3.7, use Groups the items emitted by an Observable according to a specified criterion, and emits these
grouped items as Observables, one Observable per group.
OperatorGroupByEvicting instead
|
| public class | OperatorGroupByEvicting<
the source and group value type T, the key type K, the value type of the groups V>Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as Observables, one Observable per group. |
| public class | |
| public class | OperatorMapNotification<
the input value type T, the output value type R>Applies a function of your choosing to every item emitted by an |
| public class | OperatorMapPair<
the type of items emitted by the source T, Observablethe type of items emitted by the derived U, Observablesthe type of items to be emitted by this R>OperatorAn |
| public class | OperatorMaterialize<
the value type T>Turns all of the notifications from an Observable into |
| public class | OperatorMerge<
the type of the items emitted by both the source and merged T>ObservablesFlattens a list of |
| public class | OperatorMulticast<
the source value type T, the result value type R>Shares a single subscription to a source through a Subject. |
| public class | OperatorObserveOn<
the transmitted value type T>Delivers events on the specified |
| public class | |
| public class | |
| public class | OperatorOnBackpressureLatest<
the value type T>An operator which drops all but the last received value in case the downstream doesn't request more. |
| public class | OperatorOnErrorResumeNextViaFunction<
the value type T>Instruct an Observable to pass control to another Observable (the return value of a function)
rather than invoking |
| public class | OperatorPublish<
the value type T>A connectable observable which shares an underlying source and dispatches source values to subscribers in a backpressure-aware manner. |
| public class | |
| public class | |
| public class | OperatorSampleWithObservable<
the source and result value type T, the element type of the sampler Observable U>Sample with the help of another observable. |
| public class | OperatorSampleWithTime<
the value type T>Returns an Observable that emits the results of sampling the items emitted by the source Observable at a specified time interval. |
| public class | OperatorScan<
the aggregate and output type R, the input value type T>Returns an Observable that applies a function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by an Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations. |
| public class | OperatorSequenceEqual
Returns an |
| public class | |
| public class | OperatorSingle<
the value type T>If the Observable completes after emitting a single item that matches a predicate, return an Observable containing that item. |
| public class | OperatorSkip<
the value type T>Returns an Observable that skips the first |
| public class | OperatorSkipLast<
the value type T>Bypasses a specified number of elements at the end of an observable sequence. |
| public class | |
| public class | OperatorSkipUntil<
the source and result value type T, element type of the signalling observable U>Skip elements from the source Observable until the secondary observable fires an element. |
| public class | OperatorSkipWhile<
the value type T>Skips any emitted source items as long as the specified condition holds true. |
| public class | OperatorSubscribeOn<
the value type of the actual source T>Subscribes Observers on the specified |
| public class | OperatorSwitch<
the value type T>Transforms an Observable that emits Observables into a single Observable that emits the items emitted by the most recently published of those Observables. |
| public class | OperatorTake<
the value type T>An |
| public class | OperatorTakeLast<
the value type T>Returns an Observable that emits the at most the last |
| public class | OperatorTakeLastTimed<
the value type T>Returns an Observable that emits the last |
| public class | OperatorTakeTimed<
the result value type T>Takes values from the source until the specific time elapses. |
| public class | OperatorTakeUntil<
the value type of the 'main' source T, the value type of the 'until' sequence E>Returns an Observable that emits the items from the source Observable until another Observable emits an item. |
| public class | OperatorTakeUntilPredicate<
the value type T>Returns an Observable that emits items emitted by the source Observable until the provided predicate returns false
|
| public class | OperatorTakeWhile<
the value type T>O Returns an Observable that emits items emitted by the source Observable as long as a specified condition is true. |
| public class | OperatorThrottleFirst<
the value type T>Throttle by windowing a stream and returning the first value in each window. |
| public class | OperatorTimeInterval<
the value type T>Records the time interval between consecutive elements in an observable sequence. |
| public class | OperatorTimestamp<
the value type T>Wraps each item emitted by a source |
| public class | OperatorToObservableList<
the value type of the input and the output list's items T>Returns an |
| public class | OperatorToObservableSortedList<
the type of the items emitted by the source and the resulting T>ObservablesReturn an |
| public class | |
| public class | OperatorWindowWithObservable<
the value type T, the boundary value type U>Creates non-overlapping windows of items where each window is terminated by an event from a secondary observable and a new window is started immediately. |
| public class | OperatorWindowWithObservableFactory<
the value type T, the boundary value type U>Creates non-overlapping windows of items where each window is terminated by an event from a secondary observable and a new window is started immediately. |
| public class | OperatorWindowWithSize<
the value type T>Creates windows of values into the source sequence with skip frequency and size bounds. |
| public class | OperatorWindowWithStartEndObservable<
the value type T, the type of the window opening event U, the type of the window closing event V>Creates potentially overlapping windows of the source items where each window is started by a value emitted by an observable and closed when an associated Observable emits a value or completes. |
| public class | OperatorWindowWithTime<
the value type T>Creates windows of values into the source sequence with timed window creation, length and size bounds. |
| public class | OperatorWithLatestFrom<
the element type of the main observable T, the element type of the other observable that is merged into the main U, the result element type R>Combines values from two sources only when the main source emits. |
| public class | |
| public class | OperatorZip<
the result type R>Returns an Observable that emits the results of a function applied to sets of items emitted, in sequence, by two or more other Observables. |
| public class | |
| public class | |
| public class | SingleDoAfterTerminate<
the value type T>Execute an action after onSuccess or onError has been delivered. |
| public class | |
| public class | |
| public class | |
| public class | |
| public class | SingleFromEmitter<
the success value type T>Calls an action with a SingleEmitter instance for each individual subscribers that generates a terminal signal (eventually). |
| public class | |
| public class | SingleFromObservable<
the value type T>Wrap an Observable.OnSubscribe and expose it as a Single.OnSubscribe. |
| public class | SingleLiftObservableOperator<
the input value type T, the output value type R>Lift an Observable.Operator into the Single sequence. |
| public class | |
| public class | SingleOnErrorReturn<
the value type T>Signal a value returned by a resumeFunction when the source signals a Throwable. |
| public class | SingleOnSubscribeDelaySubscriptionOther<
the Single value type T>Delays the subscription to the Single until the Observable fires an event or completes. |
| public class | SingleOnSubscribeMap<
the input value type T, the return value type R>Applies a function of your choosing to every item emitted by an |
| public class | SingleOnSubscribeUsing<
the value type of the Single T, the resource type Resource>Generates a resource, derives a Single from it and disposes that resource once the Single terminates. |
| public class | SingleOperatorCast<
the input value type T, the output value type R>Converts the element of a Single to the specified type. |
| public class | |
| public class | |
| public class | SingleTakeUntilCompletable<
the value type T>Relay the source signals if the other doesn't terminate before. |
| public class | SingleTakeUntilObservable<
the value type T, the other's value type (not relevant) U>Relay the source signals if the other doesn't terminate before. |
| public class | SingleTakeUntilSingle<
the value type T, the other's value type (not relevant) U>Relay the source signals if the other doesn't terminate before. |
| public class | |
| public class |
| Modifier and Type | Enum and Description |
|---|---|
| public enum | EmptyObservableHolder
Holds a singleton instance of an empty Observable which is stateless and completes the child subscriber immediately. |
| public enum | NeverObservableHolder
Holds a singleton instance of a never Observable which is stateless doesn't call any of the Subscriber's methods. |