java.lang.Object | |
↳ | io.reactivex.Notification<T> |
Represents the reactive signal types: onNext, onError and onComplete and holds their parameter values (a value, a Throwable, nothing).
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static <T> Notification<T> |
createOnComplete()
Returns the empty and stateless shared instance of a notification representing
an onComplete signal.
| ||||||||||
static <T> Notification<T> |
createOnError(Throwable error)
Constructs an onError notification containing the error.
| ||||||||||
static <T> Notification<T> |
createOnNext(T value)
Constructs an onNext notification containing the given value.
| ||||||||||
boolean | equals(Object obj) | ||||||||||
Throwable |
getError()
Returns the container Throwable error if this notification is an onError
signal, null otherwise.
| ||||||||||
T |
getValue()
Returns the contained value if this notification is an onNext
signal, null otherwise.
| ||||||||||
int | hashCode() | ||||||||||
boolean |
isOnComplete()
Returns true if this notification is an onComplete signal.
| ||||||||||
boolean |
isOnError()
Returns true if this notification is an onError signal and
getError() returns the contained Throwable. | ||||||||||
boolean |
isOnNext()
Returns true if this notification is an onNext signal and
getValue() returns the contained value. | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the empty and stateless shared instance of a notification representing an onComplete signal.
Constructs an onError notification containing the error.
error | the error Throwable to carry around in the notification, not null |
---|
NullPointerException | if error is null |
---|
Constructs an onNext notification containing the given value.
value | the value to carry around in the notification, not null |
---|
NullPointerException | if value is null |
---|
Returns the container Throwable error if this notification is an onError signal, null otherwise.
Returns the contained value if this notification is an onNext signal, null otherwise.
Returns true if this notification is an onComplete signal.
Returns true if this notification is an onError signal and
getError()
returns the contained Throwable.
Returns true if this notification is an onNext signal and
getValue()
returns the contained value.