Top Description Inners Fields Constructors Methods
io.reactivex.internal.functions

public final Class Functions

extends Object
Class Inheritance
Imports
java.util.*, java.util.concurrent.*, org.reactivestreams.Subscription, io.reactivex.*, io.reactivex.exceptions.OnErrorNotImplementedException, io.reactivex.functions.*, io.reactivex.plugins.RxJavaPlugins, io.reactivex.schedulers.Timed

Utility methods to convert the BiFunction, Function3..Function9 instances to Function of Object array.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
Functions.Array3Func<T1, T2, T3, R>

pack-priv static class
Functions.Array4Func<T1, T2, T3, T4, R>

pack-priv static class
Functions.Array5Func<T1, T2, T3, T4, T5, R>

pack-priv static class
Functions.Array6Func<T1, T2, T3, T4, T5, T6, R>

pack-priv static class
Functions.Array7Func<T1, T2, T3, T4, T5, T6, T7, R>

pack-priv static class
Functions.Array8Func<T1, T2, T3, T4, T5, T6, T7, T8, R>

pack-priv static class
Functions.Array9Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, R>

pack-priv static class
pack-priv static class
public 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 enum
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static enum
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
pack-priv static final Predicate<Object>
pack-priv static final Predicate<Object>
public static final Action
pack-priv static final Consumer<Object>
public static final LongConsumer
public static final Runnable
public static final Consumer<Throwable>
pack-priv static final Function<Object, Object>
IDENTITY

A singleton identity function.

pack-priv static final Comparator<Object>
pack-priv static final Callable<Object>
public static final Consumer<Throwable>
ON_ERROR_MISSING

Wraps the consumed Throwable into an OnErrorNotImplementedException and signals it to the plugin error handler.

public static final Consumer<Subscription>

Constructor Summary

AccessConstructor and Description
private
Functions()

Utility class.

Method Summary

Modifier and TypeMethod and Description
public static <T> Consumer<T>
public static <T> Predicate<T>
public static <T> Predicate<T>
public static <T> Consumer<T>
boundedConsumer(int bufferSize)

public static <
the input value type
T
,
the output and target type
U
>
Function<T, U>

Returns:

the new Function instance
castFunction
(Class<U>
the target class
target
)

Returns a function that cast the incoming values via a Class object.

public static <T> Callable<List<T>>
createArrayList(int capacity)

public static <T> Callable<Set<T>>
public static <
the consumed value type, the value is ignored
T
>
Consumer<T>

Returns:

an empty consumer that does nothing.
emptyConsumer
()

Returns an empty consumer that does nothing.

public static <T> Predicate<T>
equalsWith(T value)

public static Action

Returns:

the new Action instance
futureAction
(Future<?>
the future to call get() on, not null
future
)

Wraps the blocking get call of the Future into an Action.

public static <
the input and output value type
T
>
Function<T, T>

Returns:

the identity function
identity
()

Returns an identity function that simply returns its argument.

public static <T, U> Predicate<T>
isInstanceOf(Class<U> clazz)

public static <
the value type
T
>
Callable<T>

Returns:

the new Callable instance
justCallable
(T
the value to return
value
)

Returns a Callable that returns the given value.

public static <
the function's input type
T
,
the value and return type of the function
U
>
Function<T, U>

Returns:

the new Function instance
justFunction
(U
the value to return
value
)

Returns a Function that ignores its parameter and returns the given value.

public static <T> Function<List<T>, List<T>>
listSorter(final Comparator<? super T> comparator)

public static <T> Comparator<T>
public static <
the value type
T
>
Comparator<T>

Returns:

a natural order comparator which casts the parameters to Comparable
naturalOrder
()

Returns a natural order comparator which casts the parameters to Comparable.

public static <T> Action
notificationOnComplete(Consumer<? super Notification<T>> onNotification)

public static <T> Consumer<Throwable>
notificationOnError(Consumer<? super Notification<T>> onNotification)

public static <T> Consumer<T>
notificationOnNext(Consumer<? super Notification<T>> onNotification)

public static <T> Callable<T>
public static <T> Predicate<T>
public static <T> Function<T, Timed<T>>
timestampWith(TimeUnit unit, Scheduler scheduler)

public static <T1, T2, R> Function<Object[], R>
toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f)

public static <T1, T2, T3, R> Function<Object[], R>
toFunction(final Function3<T1, T2, T3, R> f)

public static <T1, T2, T3, T4, R> Function<Object[], R>
toFunction(final Function4<T1, T2, T3, T4, R> f)

public static <T1, T2, T3, T4, T5, R> Function<Object[], R>
toFunction(final Function5<T1, T2, T3, T4, T5, R> f)

public static <T1, T2, T3, T4, T5, T6, R> Function<Object[], R>
toFunction(final Function6<T1, T2, T3, T4, T5, T6, R> f)

public static <T1, T2, T3, T4, T5, T6, T7, R> Function<Object[], R>
toFunction(final Function7<T1, T2, T3, T4, T5, T6, T7, R> f)

public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Function<Object[], R>
toFunction(final Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> f)

public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Function<Object[], R>
toFunction(final Function9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> f)

public static <T, K> BiConsumer<Map<K, T>, T>
toMapKeySelector(final Function<? super T, ? extends K> keySelector)

public static <T, K, V> BiConsumer<Map<K, V>, T>
toMapKeyValueSelector(final Function<? super T, ? extends K> keySelector, final Function<? super T, ? extends V> valueSelector)

public static <T, K, V> BiConsumer<Map<K, Collection<V>>, T>
toMultimapKeyValueSelector(final Function<? super T, ? extends K> keySelector, final Function<? super T, ? extends V> valueSelector, final Function<? super K, ? extends Collection<? super V>> collectionFactory)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait