- Companion:
- object
Value members
Concrete methods
Note: this source will be removed when the owner
you provide says so.
To remove this source manually, call .kill() on the resulting Subscription.
Note: this source will be removed when the owner
you provide says so.
To remove this source manually, call .kill() on the resulting Subscription.
Behaves similar to contramap
, but gives you a WriteBus, not just an Observer
Behaves similar to contramap
, but gives you a WriteBus, not just an Observer
Behaves similar to filter
, but gives you a WriteBus, not just an Observer
Behaves similar to filter
, but gives you a WriteBus, not just an Observer
Inherited methods
Like contramap, but original observer only fires if project
returns Some(value)
Like contramap, but original observer only fires if project
returns Some(value)
So, similar to contracollect but optimized for APIs like NonEmptyList.fromList
that return an Option.
- Value parameters:
- project
Note: guarded against exceptions
- Inherited from:
- Observer
Creates another Observer such that calling its onNext will call this observer's onNext
with the value processed by the project
function.
Creates another Observer such that calling its onNext will call this observer's onNext
with the value processed by the project
function.
This is useful when you need to pass down an Observer[A] to a child component
which should not know anything about the type A, but both child and parent know
about type B
, and the parent knows how to translate B into A.
- Value parameters:
- project
Note: guarded against exceptions
- Inherited from:
- Observer
This is the method that subclasses override to preserve the user's ability to set custom display names.
This is the method that subclasses override to preserve the user's ability to set custom display names.
- Inherited from:
- Named
Creates another Observer such that calling it calls the original observer after the specified delay.
Creates another Observer such that calling it calls the original observer after the specified delay.
Note: unlike Observable operators, Observer operators are not ownership-aware, so this can fire the observer even after the subscription that bound this observer to the observable has been killed. So in Laminar for example, it's possible for such a delayed observer to fire even after the element that owns this subscription was unmounted. Use the Observable delay operator to avoid that.
Of course, whether anything happens if the observer is fired is a separate issue altogether. For example, if the observer is an EventBus writer, firing into it won't do anything if the EventBus stream is stopped.
- Inherited from:
- Observer
Creates another Observer such that calling its onNext will call this observer's onNext with the same value, but only if it passes the test.
Creates another Observer such that calling its onNext will call this observer's onNext with the same value, but only if it passes the test.
- Value parameters:
- passes
Note: guarded against exceptions
- Inherited from:
- Observer
Set the display name for this instance (observable or observer).
Set the display name for this instance (observable or observer).
- This method modifies the instance and returns
this
. It does not create a new instance. - New name you set will override the previous name, if any. This might change in the future. For the sake of sanity, don't call this more than once for the same instance.
- If display name is set, toString will output it instead of the standard type@hashcode string
- Inherited from:
- Named
Override defaultDisplayName instead of this, if you need to.
Override defaultDisplayName instead of this, if you need to.