Top Description Inners Fields Constructors Methods
io.reactivex.rxjava3.internal.util

public final Enum NotificationLite

extends Enum<NotificationLite>
Class Inheritance
Imports
java.io.Serializable, java.util.Objects, org.reactivestreams.*, io.reactivex.rxjava3.core.Observer, io.reactivex.rxjava3.disposables.Disposable

Lightweight notification handling utility class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
public static final NotificationLite

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
the expected value type when unwrapped
T
>
boolean

Returns:

true if the notification was a terminal event (i.e., complete or error)
accept
(Object
the notification object
o
,
Subscriber<? super T>
the subscriber to call methods on
s
)

Calls the appropriate Subscriber method based on the type of the notification.

public static <
the expected value type when unwrapped
T
>
boolean

Returns:

true if the notification was a terminal event (i.e., complete or error)
accept
(Object
the notification object
o
,
Observer<? super T>
the Observer to call methods on
observer
)

Calls the appropriate Observer method based on the type of the notification.

public static <
the expected value type when unwrapped
T
>
boolean

Returns:

true if the notification was a terminal event (i.e., complete or error)
acceptFull
(Object
the notification object
o
,
Subscriber<? super T>
the subscriber to call methods on
s
)

Calls the appropriate Subscriber method based on the type of the notification.

public static <
the expected value type when unwrapped
T
>
boolean

Returns:

true if the notification was a terminal event (i.e., complete or error)
acceptFull
(Object
the notification object
o
,
Observer<? super T>
the subscriber to call methods on
observer
)

Calls the appropriate Observer method based on the type of the notification.

public static Object

Returns:

a complete notification
complete
()

Returns a complete notification.

public static Object

Returns:

the notification representing the Disposable
disposable
(Disposable
the disposable to convert
d
)

Converts a Disposable into a notification value.

public static Object

Returns:

the notification representing the Throwable
error
(Throwable
the Throwable to convert
e
)

Converts a Throwable into a notification value.

public static Disposable
public static Throwable

Returns:

the extracted Throwable
getError
(Object
the notification object
o
)

Extracts the Throwable from the notification object.

public static Subscription

Returns:

the extracted Subscription
getSubscription
(Object
the notification object
o
)

Extracts the Subscription from the notification object.

public static <
the expected value type when unwrapped
T
>
T

Returns:

the extracted value
getValue
(Object
the notification object
o
)

Extracts the value from the notification object.

public static boolean

Returns:

true if the object represents a complete notification
isComplete
(Object
the object to check
o
)

Checks if the given object represents a complete notification.

public static boolean
public static boolean

Returns:

true if the object represents a error notification
isError
(Object
the object to check
o
)

Checks if the given object represents a error notification.

public static boolean

Returns:

true if the object represents a subscription notification
isSubscription
(Object
the object to check
o
)

Checks if the given object represents a subscription notification.

public static <
the actual value type
T
>
Object

Returns:

the notification representing the value
next
(T
the value to convert
value
)

Converts a value into a notification value.

public static Object

Returns:

the notification representing the Subscription
subscription
(Subscription
the Subscription to convert
s
)

Converts a Subscription into a notification value.

public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static NotificationLite
public static NotificationLite[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

COMPLETEback to summary
public static final NotificationLite COMPLETE

Constructor Detail

NotificationLiteback to summary
private NotificationLite()

Method Detail

acceptback to summary
public static <T> boolean accept(Object o, Subscriber<? super T> s)

Calls the appropriate Subscriber method based on the type of the notification.

Does not check for a subscription notification, see acceptFull(Object, Subscriber).

Parameters
<T>
the expected value type when unwrapped
o:Object

the notification object

s:Subscriber<? super T>

the subscriber to call methods on

Returns:boolean

true if the notification was a terminal event (i.e., complete or error)

Annotations
@SuppressWarnings:unchecked
See Also
acceptFull(Object, Subscriber)
acceptback to summary
public static <T> boolean accept(Object o, Observer<? super T> observer)

Calls the appropriate Observer method based on the type of the notification.

Does not check for a subscription notification.

Parameters
<T>
the expected value type when unwrapped
o:Object

the notification object

observer:Observer<? super T>

the Observer to call methods on

Returns:boolean

true if the notification was a terminal event (i.e., complete or error)

Annotations
@SuppressWarnings:unchecked
acceptFullback to summary
public static <T> boolean acceptFull(Object o, Subscriber<? super T> s)

Calls the appropriate Subscriber method based on the type of the notification.

Parameters
<T>
the expected value type when unwrapped
o:Object

the notification object

s:Subscriber<? super T>

the subscriber to call methods on

Returns:boolean

true if the notification was a terminal event (i.e., complete or error)

Annotations
@SuppressWarnings:unchecked
See Also
accept(Object, Subscriber)
acceptFullback to summary
public static <T> boolean acceptFull(Object o, Observer<? super T> observer)

Calls the appropriate Observer method based on the type of the notification.

Parameters
<T>
the expected value type when unwrapped
o:Object

the notification object

observer:Observer<? super T>

the subscriber to call methods on

Returns:boolean

true if the notification was a terminal event (i.e., complete or error)

Annotations
@SuppressWarnings:unchecked
See Also
accept(Object, Observer)
completeback to summary
public static Object complete()

Returns a complete notification.

Returns:Object

a complete notification

disposableback to summary
public static Object disposable(Disposable d)

Converts a Disposable into a notification value.

Parameters
d:Disposable

the disposable to convert

Returns:Object

the notification representing the Disposable

errorback to summary
public static Object error(Throwable e)

Converts a Throwable into a notification value.

Parameters
e:Throwable

the Throwable to convert

Returns:Object

the notification representing the Throwable

getDisposableback to summary
public static Disposable getDisposable(Object o)
getErrorback to summary
public static Throwable getError(Object o)

Extracts the Throwable from the notification object.

Parameters
o:Object

the notification object

Returns:Throwable

the extracted Throwable

getSubscriptionback to summary
public static Subscription getSubscription(Object o)

Extracts the Subscription from the notification object.

Parameters
o:Object

the notification object

Returns:Subscription

the extracted Subscription

getValueback to summary
public static <T> T getValue(Object o)

Extracts the value from the notification object.

Parameters
<T>
the expected value type when unwrapped
o:Object

the notification object

Returns:T

the extracted value

Annotations
@SuppressWarnings:unchecked
isCompleteback to summary
public static boolean isComplete(Object o)

Checks if the given object represents a complete notification.

Parameters
o:Object

the object to check

Returns:boolean

true if the object represents a complete notification

isDisposableback to summary
public static boolean isDisposable(Object o)
isErrorback to summary
public static boolean isError(Object o)

Checks if the given object represents a error notification.

Parameters
o:Object

the object to check

Returns:boolean

true if the object represents a error notification

isSubscriptionback to summary
public static boolean isSubscription(Object o)

Checks if the given object represents a subscription notification.

Parameters
o:Object

the object to check

Returns:boolean

true if the object represents a subscription notification

nextback to summary
public static <T> Object next(T value)

Converts a value into a notification value.

Parameters
<T>
the actual value type
value:T

the value to convert

Returns:Object

the notification representing the value

subscriptionback to summary
public static Object subscription(Subscription s)

Converts a Subscription into a notification value.

Parameters
s:Subscription

the Subscription to convert

Returns:Object

the notification representing the Subscription

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static NotificationLite valueOf(String name)
valuesback to summary
public static NotificationLite[] values()
io.reactivex.rxjava3.internal.util back to summary

pack-priv final Class NotificationLite.DisposableNotification

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • io.reactivex.rxjava3.internal.util.NotificationLite.DisposableNotification
All Implemented Interfaces
java.io.Serializable

Wraps a Disposable.

Field Summary

Modifier and TypeField and Description
private static final long
pack-priv final Disposable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
upstreamback to summary
pack-priv final Disposable upstream

Constructor Detail

DisposableNotificationback to summary
pack-priv DisposableNotification(Disposable d)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
io.reactivex.rxjava3.internal.util back to summary

pack-priv final Class NotificationLite.ErrorNotification

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • io.reactivex.rxjava3.internal.util.NotificationLite.ErrorNotification
All Implemented Interfaces
java.io.Serializable

Wraps a Throwable.

Field Summary

Modifier and TypeField and Description
pack-priv final Throwable
e

private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

eback to summary
pack-priv final Throwable e
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

ErrorNotificationback to summary
pack-priv ErrorNotification(Throwable e)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
io.reactivex.rxjava3.internal.util back to summary

pack-priv final Class NotificationLite.SubscriptionNotification

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • io.reactivex.rxjava3.internal.util.NotificationLite.SubscriptionNotification
All Implemented Interfaces
java.io.Serializable

Wraps a Subscription.

Field Summary

Modifier and TypeField and Description
private static final long
pack-priv final Subscription

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
upstreamback to summary
pack-priv final Subscription upstream

Constructor Detail

SubscriptionNotificationback to summary
pack-priv SubscriptionNotification(Subscription s)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override