public enum InternalObservableUtils extends Enum<InternalObservableUtils>
Modifier and Type | Field and Description |
---|---|
static rx.internal.util.InternalObservableUtils.PlusOneFunc2 |
COUNTER
A BiFunction that expects an integer as its first parameter and returns +1.
|
static Action1<Throwable> |
ERROR_NOT_IMPLEMENTED
Throws an OnErrorNotImplementedException when called.
|
static Observable.Operator<Boolean,Object> |
IS_EMPTY |
static rx.internal.util.InternalObservableUtils.PlusOneLongFunc2 |
LONG_COUNTER
A BiFunction that expects a long as its first parameter and returns +1.
|
static rx.internal.util.InternalObservableUtils.ObjectEqualsFunc2 |
OBJECT_EQUALS
A two-argument function comparing two objects via null-safe equals.
|
static rx.internal.util.InternalObservableUtils.ToArrayFunc1 |
TO_ARRAY
A function that converts a List of Observables into an array of Observables.
|
Modifier and Type | Method and Description |
---|---|
static <T,R> Func2<R,T,R> |
createCollectorCaller(Action2<R,? super T> collector)
Returns a Func2 which calls a collector with its parameters and returns the first (R) parameter.
|
static Func1<Observable<? extends Notification<?>>,Observable<?>> |
createRepeatDematerializer(Func1<? super Observable<? extends Void>,? extends Observable<?>> notificationHandler)
Returns a function that dematerializes the notification signal from an Observable and calls
a notification handler with a null for non-terminal events.
|
static <T,R> Func1<Observable<T>,Observable<R>> |
createReplaySelectorAndObserveOn(Func1<? super Observable<T>,? extends Observable<R>> selector,
Scheduler scheduler)
Creates a Func1 which calls the selector function with the received argument, applies an
observeOn on the result and returns the resulting Observable.
|
static <T> Func0<ConnectableObservable<T>> |
createReplaySupplier(Observable<T> source)
Returns a Func0 that supplies the ConnectableObservable returned by calling replay() on the source.
|
static <T> Func0<ConnectableObservable<T>> |
createReplaySupplier(Observable<T> source,
int bufferSize)
Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.
|
static <T> Func0<ConnectableObservable<T>> |
createReplaySupplier(Observable<T> source,
int bufferSize,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.
|
static <T> Func0<ConnectableObservable<T>> |
createReplaySupplier(Observable<T> source,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns a Func0 that supplies the ConnectableObservable returned by calling a parameterized replay() on the source.
|
static Func1<Observable<? extends Notification<?>>,Observable<?>> |
createRetryDematerializer(Func1<? super Observable<? extends Throwable>,? extends Observable<?>> notificationHandler)
Returns a function that dematerializes the notification signal from an Observable and calls
a notification handler with the Throwable.
|
static Func1<Object,Boolean> |
equalsWith(Object other)
Returns a Func1 that checks if its argument is null-safe equals with the given
constant reference.
|
static Func1<Object,Boolean> |
isInstanceOf(Class<?> clazz)
Returns a Func1 that checks if its argument is an instance of
the supplied class.
|
static InternalObservableUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InternalObservableUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final rx.internal.util.InternalObservableUtils.PlusOneLongFunc2 LONG_COUNTER
public static final rx.internal.util.InternalObservableUtils.ObjectEqualsFunc2 OBJECT_EQUALS
public static final rx.internal.util.InternalObservableUtils.ToArrayFunc1 TO_ARRAY
public static final rx.internal.util.InternalObservableUtils.PlusOneFunc2 COUNTER
public static final Action1<Throwable> ERROR_NOT_IMPLEMENTED
public static final Observable.Operator<Boolean,Object> IS_EMPTY
public static InternalObservableUtils[] values()
for (InternalObservableUtils c : InternalObservableUtils.values()) System.out.println(c);
public static InternalObservableUtils 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 Func1<Object,Boolean> equalsWith(Object other)
other
- the other object to check against (nulls allowed)public static Func1<Object,Boolean> isInstanceOf(Class<?> clazz)
clazz
- the class to check againstpublic static Func1<Observable<? extends Notification<?>>,Observable<?>> createRepeatDematerializer(Func1<? super Observable<? extends Void>,? extends Observable<?>> notificationHandler)
notificationHandler
- the handler to notify with nullspublic static <T,R> Func1<Observable<T>,Observable<R>> createReplaySelectorAndObserveOn(Func1<? super Observable<T>,? extends Observable<R>> selector, Scheduler scheduler)
T
- the input value typeR
- the output value typeselector
- the selector functionscheduler
- the scheduler to apply on the output of the selectorpublic static Func1<Observable<? extends Notification<?>>,Observable<?>> createRetryDematerializer(Func1<? super Observable<? extends Throwable>,? extends Observable<?>> notificationHandler)
notificationHandler
- the handler to notify with Throwablespublic static <T> Func0<ConnectableObservable<T>> createReplaySupplier(Observable<T> source)
T
- the input value typesource
- the source to call replay on by the supplier functionpublic static <T> Func0<ConnectableObservable<T>> createReplaySupplier(Observable<T> source, int bufferSize)
T
- the input value typesource
- the source to call replay on by the supplier functionbufferSize
- the buffer size that limits the number of items the connectable observable can replaypublic static <T> Func0<ConnectableObservable<T>> createReplaySupplier(Observable<T> source, long time, TimeUnit unit, Scheduler scheduler)
T
- the input value typesource
- the source to call replay on by the supplier functiontime
- the duration of the window in which the replayed items must have been emittedunit
- the time unit of time
scheduler
- the scheduler to use for timing informationpublic static <T> Func0<ConnectableObservable<T>> createReplaySupplier(Observable<T> source, int bufferSize, long time, TimeUnit unit, Scheduler scheduler)
T
- the input value typesource
- the source to call replay on by the supplier functionbufferSize
- the buffer size that limits the number of items the connectable observable can replaytime
- the duration of the window in which the replayed items must have been emittedunit
- the time unit of time
scheduler
- the scheduler to use for timing informationpublic static <T,R> Func2<R,T,R> createCollectorCaller(Action2<R,? super T> collector)
T
- the input value typeR
- the result value typecollector
- the collector action to callCopyright © 2017. All rights reserved.