public enum NotificationLite extends Enum<NotificationLite>
Enum Constant and Description |
---|
COMPLETE |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
accept(Object o,
Observer<? super T> s)
Calls the appropriate Observer method based on the type of the notification.
|
static <T> boolean |
accept(Object o,
org.reactivestreams.Subscriber<? super T> s)
Calls the appropriate Subscriber method based on the type of the notification.
|
static <T> boolean |
acceptFull(Object o,
Observer<? super T> s)
Calls the appropriate Observer method based on the type of the notification.
|
static <T> boolean |
acceptFull(Object o,
org.reactivestreams.Subscriber<? super T> s)
Calls the appropriate Subscriber method based on the type of the notification.
|
static Object |
complete()
Returns a complete notification.
|
static Object |
disposable(Disposable d)
Converts a Disposable into a notification value.
|
static Object |
error(Throwable e)
Converts a Throwable into a notification value.
|
static Disposable |
getDisposable(Object o) |
static Throwable |
getError(Object o)
Extracts the Throwable from the notification object.
|
static org.reactivestreams.Subscription |
getSubscription(Object o)
Extracts the Subscription from the notification object.
|
static <T> T |
getValue(Object o)
Extracts the value from the notification object.
|
static boolean |
isComplete(Object o)
Checks if the given object represents a complete notification.
|
static boolean |
isDisposable(Object o) |
static boolean |
isError(Object o)
Checks if the given object represents a error notification.
|
static boolean |
isSubscription(Object o)
Checks if the given object represents a subscription notification.
|
static <T> Object |
next(T value)
Converts a value into a notification value.
|
static Object |
subscription(org.reactivestreams.Subscription s)
Converts a Subscription into a notification value.
|
String |
toString() |
static NotificationLite |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NotificationLite[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NotificationLite COMPLETE
public static NotificationLite[] values()
for (NotificationLite c : NotificationLite.values()) System.out.println(c);
public static NotificationLite valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static <T> Object next(T value)
T
- the actual value typevalue
- the value to convertpublic static Object complete()
public static Object error(Throwable e)
e
- the Throwable to convertpublic static Object subscription(org.reactivestreams.Subscription s)
s
- the Subscription to convertpublic static Object disposable(Disposable d)
d
- the disposable to convertpublic static boolean isComplete(Object o)
o
- the object to checkpublic static boolean isError(Object o)
o
- the object to checkpublic static boolean isSubscription(Object o)
o
- the object to checkpublic static boolean isDisposable(Object o)
public static <T> T getValue(Object o)
T
- the expected value type when unwrappedo
- the notification objectpublic static Throwable getError(Object o)
o
- the notification objectpublic static org.reactivestreams.Subscription getSubscription(Object o)
o
- the notification objectpublic static Disposable getDisposable(Object o)
public static <T> boolean accept(Object o, org.reactivestreams.Subscriber<? super T> s)
Does not check for a subscription notification, see acceptFull(Object, Subscriber)
.
T
- the expected value type when unwrappedo
- the notification objects
- the subscriber to call methods onacceptFull(Object, Subscriber)
public static <T> boolean accept(Object o, Observer<? super T> s)
Does not check for a subscription notification.
T
- the expected value type when unwrappedo
- the notification objects
- the Observer to call methods onpublic static <T> boolean acceptFull(Object o, org.reactivestreams.Subscriber<? super T> s)
T
- the expected value type when unwrappedo
- the notification objects
- the subscriber to call methods onaccept(Object, Subscriber)
public static <T> boolean acceptFull(Object o, Observer<? super T> s)
T
- the expected value type when unwrappedo
- the notification objects
- the subscriber to call methods onaccept(Object, Observer)
public String toString()
toString
in class Enum<NotificationLite>
Copyright © 2018 JBoss by Red Hat. All rights reserved.