Top Description Inners Fields Constructors Methods
rx.internal.util

public final Enum InternalObservableUtils

extends Enum<InternalObservableUtils>
Class Inheritance
Imports
java.util.List, java.util.concurrent.TimeUnit, rx.*, .Observable.Operator, rx.exceptions.OnErrorNotImplementedException, rx.functions.*, rx.internal.operators.OperatorAny, rx.observables.ConnectableObservable

Holder of named utility classes factored out from Observable to save source space and help with debugging with properly named objects.

Nested and Inner Type Summary

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

Field Summary

Modifier and TypeField and Description
public static final InternalObservableUtils.PlusOneFunc2
COUNTER

A BiFunction that expects an integer as its first parameter and returns +1.

pack-priv static final InternalObservableUtils.NotificationErrorExtractor
public static final Action1<Throwable>
ERROR_NOT_IMPLEMENTED

Throws an OnErrorNotImplementedException when called.

public static final Observable.Operator<Boolean, Object>
public static final InternalObservableUtils.PlusOneLongFunc2
LONG_COUNTER

A BiFunction that expects a long as its first parameter and returns +1.

public static final InternalObservableUtils.ObjectEqualsFunc2
OBJECT_EQUALS

A two-argument function comparing two objects via null-safe equals.

pack-priv static final InternalObservableUtils.ReturnsVoidFunc1
public static final InternalObservableUtils.ToArrayFunc1
TO_ARRAY

A function that converts a List of Observables into an array of Observables.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
the input value type
T
,
the result value type
R
>
Func2<R, T, R>

Returns:

the new Func2 instance
createCollectorCaller
(Action2<R, ? super T>
the collector action to call
collector
)

Returns a Func2 which calls a collector with its parameters and returns the first (R) parameter.

public static Func1<Observable<? extends Notification<?>>, Observable<?>>

Returns:

the Func1 instance
createRepeatDematerializer
(Func1<? super Observable<? extends Void>, ? extends Observable<?>>
the handler to notify with nulls
notificationHandler
)

Returns a function that dematerializes the notification signal from an Observable and calls a notification handler with a null for non-terminal events.

public static <
the input value type
T
,
the output value type
R
>
Func1<Observable<T>, Observable<R>>

Returns:

the new Func1 instance
createReplaySelectorAndObserveOn
(Func1<? super Observable<T>, ? extends Observable<R>>
the selector function
selector
,
Scheduler
the scheduler to apply on the output of the selector
scheduler
)

Creates a Func1 which calls the selector function with the received argument, applies an observeOn on the result and returns the resulting Observable.

public static <
the input value type
T
>
Func0<ConnectableObservable<T>>

Returns:

the new Func0 instance
createReplaySupplier
(final Observable<T>
the source to call replay on by the supplier function
source
)

Returns a Func0 that supplies the ConnectableObservable returned by calling replay() on the source.

public static <
the input value type
T
>
Func0<ConnectableObservable<T>>

Returns:

the new Func0 instance
createReplaySupplier
(final Observable<T>
the source to call replay on by the supplier function
source
,
final int
the buffer size that limits the number of items the connectable observable can replay
bufferSize
)

Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.

public static <
the input value type
T
>
Func0<ConnectableObservable<T>>

Returns:

the new Func0 instance
createReplaySupplier
(final Observable<T>
the source to call replay on by the supplier function
source
,
final long
the duration of the window in which the replayed items must have been emitted
time
,
final TimeUnit
the time unit of time
unit
,
final Scheduler
the scheduler to use for timing information
scheduler
)

Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.

public static <
the input value type
T
>
Func0<ConnectableObservable<T>>

Returns:

the new Func0 instance
createReplaySupplier
(final Observable<T>
the source to call replay on by the supplier function
source
,
final int
the buffer size that limits the number of items the connectable observable can replay
bufferSize
,
final long
the duration of the window in which the replayed items must have been emitted
time
,
final TimeUnit
the time unit of time
unit
,
final Scheduler
the scheduler to use for timing information
scheduler
)

Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.

public static Func1<Observable<? extends Notification<?>>, Observable<?>>

Returns:

the Func1 instance
createRetryDematerializer
(Func1<? super Observable<? extends Throwable>, ? extends Observable<?>>
the handler to notify with Throwables
notificationHandler
)

Returns a function that dematerializes the notification signal from an Observable and calls a notification handler with the Throwable.

public static Func1<Object, Boolean>

Returns:

the comparison function
equalsWith
(Object
the other object to check against (nulls allowed)
other
)

Returns a Func1 that checks if its argument is null-safe equals with the given constant reference.

public static Func1<Object, Boolean>

Returns:

the comparison function
isInstanceOf
(Class<?>
the class to check against
clazz
)

Returns a Func1 that checks if its argument is an instance of the supplied class.

public static InternalObservableUtils
public static InternalObservableUtils[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf