Implicit scheduler required for asynchronous boundaries.
Implicit scheduler required for asynchronous boundaries.
Function that creates the actual subscription when calling subscribe
,
and that starts the stream, being meant to be overridden in custom combinators
or in classes implementing Observable.
Function that creates the actual subscription when calling subscribe
,
and that starts the stream, being meant to be overridden in custom combinators
or in classes implementing Observable.
is an Observer on which onNext
, onComplete
and onError
happens, according to the Rx grammar.
a cancelable that can be used to cancel the streaming
Concatenates the source Observable with the other Observable, as specified.
Concatenates the source Observable with the other Observable, as specified.
Returns the first generated result as a Future and then cancels the subscription.
Returns the first generated result as a Future and then cancels the subscription.
Executes the given callback when the stream has ended on onCompleted
Executes the given callback when the stream has ended on onCompleted
NOTE: protect the callback such that it doesn't throw exceptions, because
it gets executed when cancel()
happens and by definition the error cannot
be streamed with onError()
and so the behavior is left as undefined, possibly
crashing the application or worse - leading to non-deterministic behavior.
the callback to execute when the subscription is canceled
Executes the given callback for each element generated by the source Observable, useful for doing side-effects.
Executes the given callback for each element generated by the source Observable, useful for doing side-effects.
a new Observable that executes the specified callback for each element
Drops the first n elements (from the start).
Drops the first n elements (from the start).
the number of elements to drop
a new Observable that drops the first n elements emitted by the source
Drops the longest prefix of elements that satisfy the given predicate and returns a new Observable that emits the rest.
Drops the longest prefix of elements that satisfy the given predicate and returns a new Observable that emits the rest.
Returns an Observable which emits a single value, either true, in case the given predicate holds for at least one item, or false otherwise.
Returns an Observable which emits a single value, either true, in case the given predicate holds for at least one item, or false otherwise.
a function that evaluates the items emitted by the source Observable, returning true
if they pass the filter
an Observable that emits only true or false in case the given predicate holds or not for at least one item
Returns an Observable which only emits those items for which the given predicate holds.
Returns an Observable which only emits those items for which the given predicate holds.
a function that evaluates the items emitted by the source Observable, returning true
if they pass the filter
an Observable that emits only those items in the original Observable for which the filter evaluates as true
Returns an Observable which only emits the first item for which the predicate holds.
Returns an Observable which only emits the first item for which the predicate holds.
a function that evaluates the items emitted by the source Observable, returning true
if they pass the filter
an Observable that emits only the first item in the original Observable for which the filter evaluates as true
Emits the first element emitted by the source, or otherwise if the source is completed without
emitting anything, then the default
is emitted.
Emits the first element emitted by the source, or otherwise if the source is completed without
emitting anything, then the default
is emitted.
Alias for headOrElse
.
Creates a new Observable by applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.
Creates a new Observable by applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.
a function that, when applied to an item emitted by the source Observable, returns an Observable
an Observable that emits the result of applying the transformation function to each item emitted by the source Observable and merging the results of the Observables obtained from this transformation.
Flattens the sequence of Observables emitted by the source into one Observable, without any transformation.
Flattens the sequence of Observables emitted by the source into one Observable, without any transformation.
You can combine the items emitted by multiple Observables so that they act like a single Observable by using this method.
This operation is only available if this
is of type Observable[Observable[B]]
for some B
,
otherwise you'll get a compilation error.
an Observable that emits items that are the result of flattening the items emitted
by the Observables emitted by this
Applies a binary operator to a start value and all elements of this Observable,
going left to right and returns a new Observable that emits only one item
before onCompleted
.
Applies a binary operator to a start value and all elements of this Observable,
going left to right and returns a new Observable that emits only one item
before onCompleted
.
Returns an Observable that emits a single boolean, either true, in case the given predicate holds for all the items emitted by the source, or false in case at least one item is not verifying the given predicate.
Returns an Observable that emits a single boolean, either true, in case the given predicate holds for all the items emitted by the source, or false in case at least one item is not verifying the given predicate.
a function that evaluates the items emitted by the source Observable, returning true
if they pass the filter
an Observable that emits only true or false in case the given predicate holds or not for all the items
Only emits the first element emitted by the source observable, after which it's completed immediately.
Only emits the first element emitted by the source observable, after which it's completed immediately.
Emits the first element emitted by the source, or otherwise if the source is completed without
emitting anything, then the default
is emitted.
Emits the first element emitted by the source, or otherwise if the source is completed without
emitting anything, then the default
is emitted.
Returns an Observable that applies the given function to each item emitted by an Observable and emits the result.
Returns an Observable that applies the given function to each item emitted by an Observable and emits the result.
a function to apply to each item emitted by the Observable
an Observable that emits the items from the source Observable, transformed by the given function
Returns a new Observable that uses the specified ExecutionContext
for listening to the emitted items.
Returns a new Observable that uses the specified ExecutionContext
for listening to the emitted items.
Applies a binary operator to a start value and all elements of this Observable, going left to right and returns a new Observable that emits on each step the result of the applied function.
Applies a binary operator to a start value and all elements of this Observable, going left to right and returns a new Observable that emits on each step the result of the applied function.
Similar to foldLeft, but emits the state on each step. Useful for modeling finite state machines.
Returns a new Observable that uses the specified ExecutionContext
for initiating the subscription.
Returns a new Observable that uses the specified ExecutionContext
for initiating the subscription.
Helper to be used by consumers for subscribing to an observable.
Helper to be used by consumers for subscribing to an observable.
Helper to be used by consumers for subscribing to an observable.
Helper to be used by consumers for subscribing to an observable.
Helper to be used by consumers for subscribing to an observable.
Helper to be used by consumers for subscribing to an observable.
Drops the first element of the source observable, emitting the rest.
Drops the first element of the source observable, emitting the rest.
Selects the first n elements (from the start).
Selects the first n elements (from the start).
the number of elements to take
a new Observable that emits only the first n elements from the source
Takes longest prefix of elements that satisfy the given predicate and returns a new Observable that emits those elements.
Takes longest prefix of elements that satisfy the given predicate and returns a new Observable that emits those elements.
Creates a new Observable from this Observable and another given Observable, by emitting elements combined in pairs.
Creates a new Observable from this Observable and another given Observable, by emitting elements combined in pairs. If one of the Observable emits fewer events than the other, then the rest of the unpaired events are ignored.