RxJava



rx.functions
Class Functions

java.lang.Object
  extended by rx.functions.Functions

public class Functions
extends java.lang.Object


Constructor Summary
Functions()
           
 
Method Summary
static
<T> Func1<? super T,java.lang.Boolean>
alwaysFalse()
           
static
<T> Func1<? super T,java.lang.Boolean>
alwaysTrue()
           
static FuncN<java.lang.Void> fromAction(Action0 f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0> FuncN<java.lang.Void>
fromAction(Action1<? super T0> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1> FuncN<java.lang.Void>
fromAction(Action2<? super T0,? super T1> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2> FuncN<java.lang.Void>
fromAction(Action3<? super T0,? super T1,? super T2> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<R> FuncN<R>
fromFunc(Func0<? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,R> FuncN<R>
fromFunc(Func1<? super T0,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,R> FuncN<R>
fromFunc(Func2<? super T0,? super T1,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,R>
FuncN<R>
fromFunc(Func3<? super T0,? super T1,? super T2,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,T3,R>
FuncN<R>
fromFunc(Func4<? super T0,? super T1,? super T2,? super T3,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,T3,T4,R>
FuncN<R>
fromFunc(Func5<? super T0,? super T1,? super T2,? super T3,? super T4,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,T3,T4,T5,R>
FuncN<R>
fromFunc(Func6<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,T3,T4,T5,T6,R>
FuncN<R>
fromFunc(Func7<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,T3,T4,T5,T6,T7,R>
FuncN<R>
fromFunc(Func8<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T0,T1,T2,T3,T4,T5,T6,T7,T8,R>
FuncN<R>
fromFunc(Func9<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
          Convert a function to FuncN to allow heterogeneous handling of functions with different arities.
static
<T> Func1<T,T>
identity()
           
static
<T> Func1<T,java.lang.Boolean>
not(Func1<? super T,java.lang.Boolean> predicate)
          Constructs a predicate that returns true for each input that the source predicate returns false for and vice versa.
static
<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,R>
rx.functions.Functions.NullFunction<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,R>
returnNull()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Functions

public Functions()
Method Detail

fromFunc

public static <R> FuncN<R> fromFunc(Func0<? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,R> FuncN<R> fromFunc(Func1<? super T0,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,R> FuncN<R> fromFunc(Func2<? super T0,? super T1,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,R> FuncN<R> fromFunc(Func3<? super T0,? super T1,? super T2,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,T3,R> FuncN<R> fromFunc(Func4<? super T0,? super T1,? super T2,? super T3,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,T3,T4,R> FuncN<R> fromFunc(Func5<? super T0,? super T1,? super T2,? super T3,? super T4,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,T3,T4,T5,R> FuncN<R> fromFunc(Func6<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,T3,T4,T5,T6,R> FuncN<R> fromFunc(Func7<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,T3,T4,T5,T6,T7,R> FuncN<R> fromFunc(Func8<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromFunc

public static <T0,T1,T2,T3,T4,T5,T6,T7,T8,R> FuncN<R> fromFunc(Func9<? super T0,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromAction

public static FuncN<java.lang.Void> fromAction(Action0 f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromAction

public static <T0> FuncN<java.lang.Void> fromAction(Action1<? super T0> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromAction

public static <T0,T1> FuncN<java.lang.Void> fromAction(Action2<? super T0,? super T1> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

fromAction

public static <T0,T1,T2> FuncN<java.lang.Void> fromAction(Action3<? super T0,? super T1,? super T2> f)
Convert a function to FuncN to allow heterogeneous handling of functions with different arities.

Parameters:
f -
Returns:
FuncN

not

public static <T> Func1<T,java.lang.Boolean> not(Func1<? super T,java.lang.Boolean> predicate)
Constructs a predicate that returns true for each input that the source predicate returns false for and vice versa.

Parameters:
predicate - The source predicate to negate.

alwaysTrue

public static <T> Func1<? super T,java.lang.Boolean> alwaysTrue()

alwaysFalse

public static <T> Func1<? super T,java.lang.Boolean> alwaysFalse()

identity

public static <T> Func1<T,T> identity()

returnNull

public static <T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,R> rx.functions.Functions.NullFunction<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,R> returnNull()