Package rx.functions
Class Actions
java.lang.Object
rx.functions.Actions
Utility class for the Action interfaces.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T0,T1, T2, T3, T4, T5, T6, T7, T8>
Actions.EmptyAction<T0, T1, T2, T3, T4, T5, T6, T7, T8> empty()static <T> Action1<T> Wraps an Action0 instance into an Action1 instance where the latter calls the former.Converts anAction0to a function that calls the action and returnsnull.static <R> Func0<R> Converts anAction0to a function that calls the action and returns a specified value.Converts anAction1to a function that calls the action and returnsnull.static <T1,R> Func1 <T1, R> Converts anAction1to a function that calls the action and returns a specified value.Converts anAction2to a function that calls the action and returnsnull.static <T1,T2, R>
Func2<T1, T2, R> Converts anAction2to a function that calls the action and returns a specified value.Converts anAction3to a function that calls the action and returnsnull.static <T1,T2, T3, R>
Func3<T1, T2, T3, R> Converts anAction3to a function that calls the action and returns a specified value.Converts anAction4to a function that calls the action and returnsnull.static <T1,T2, T3, T4, R>
Func4<T1, T2, T3, T4, R> Converts anAction4to a function that calls the action and returns a specified value.Converts anAction5to a function that calls the action and returnsnull.static <T1,T2, T3, T4, T5, R>
Func5<T1, T2, T3, T4, T5, R> Converts anAction5to a function that calls the action and returns a specified value.Converts anAction6to a function that calls the action and returnsnull.static <T1,T2, T3, T4, T5, T6, R>
Func6<T1, T2, T3, T4, T5, T6, R> Converts anAction6to a function that calls the action and returns a specified value.Converts anAction7to a function that calls the action and returnsnull.static <T1,T2, T3, T4, T5, T6, T7, R>
Func7<T1, T2, T3, T4, T5, T6, T7, R> Converts anAction7to a function that calls the action and returns a specified value.Converts anAction8to a function that calls the action and returnsnull.static <T1,T2, T3, T4, T5, T6, T7, T8, R>
Func8<T1, T2, T3, T4, T5, T6, T7, T8, R> Converts anAction8to a function that calls the action and returns a specified value.Converts anAction9to a function that calls the action and returnsnull.static <T1,T2, T3, T4, T5, T6, T7, T8, T9, R>
Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Converts anAction9to a function that calls the action and returns a specified value.Converts anActionNto a function that calls the action and returnsnull.static <R> FuncN<R> Converts anActionNto a function that calls the action and returns a specified value.
-
Field Details
-
EMPTY_ACTION
-
-
Constructor Details
-
Actions
private Actions()
-
-
Method Details
-
empty
public static <T0,T1, Actions.EmptyAction<T0,T2, T3, T4, T5, T6, T7, T8> T1, empty()T2, T3, T4, T5, T6, T7, T8> -
toFunc
Converts anAction0to a function that calls the action and returnsnull. -
toFunc
Converts anAction1to a function that calls the action and returnsnull. -
toFunc
Converts anAction2to a function that calls the action and returnsnull. -
toFunc
Converts anAction3to a function that calls the action and returnsnull. -
toFunc
Converts anAction4to a function that calls the action and returnsnull. -
toFunc
public static <T1,T2, Func5<T1,T3, T4, T5> T2, toFuncT3, T4, T5, Void> (Action5<T1, T2, T3, T4, T5> action) Converts anAction5to a function that calls the action and returnsnull. -
toFunc
public static <T1,T2, Func6<T1,T3, T4, T5, T6> T2, toFuncT3, T4, T5, T6, Void> (Action6<T1, T2, T3, T4, T5, T6> action) Converts anAction6to a function that calls the action and returnsnull. -
toFunc
public static <T1,T2, Func7<T1,T3, T4, T5, T6, T7> T2, toFuncT3, T4, T5, T6, T7, Void> (Action7<T1, T2, T3, T4, T5, T6, T7> action) Converts anAction7to a function that calls the action and returnsnull.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeT7- the seventh argument type- Parameters:
action- theAction7to convert- Returns:
- a
Func7that callsactionand returnsnull
-
toFunc
public static <T1,T2, Func8<T1,T3, T4, T5, T6, T7, T8> T2, toFuncT3, T4, T5, T6, T7, T8, Void> (Action8<T1, T2, T3, T4, T5, T6, T7, T8> action) Converts anAction8to a function that calls the action and returnsnull.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeT7- the seventh argument typeT8- the eigth argument type- Parameters:
action- theAction8to convert- Returns:
- a
Func8that callsactionand returnsnull
-
toFunc
public static <T1,T2, Func9<T1,T3, T4, T5, T6, T7, T8, T9> T2, toFuncT3, T4, T5, T6, T7, T8, T9, Void> (Action9<T1, T2, T3, T4, T5, T6, T7, T8, T9> action) Converts anAction9to a function that calls the action and returnsnull.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeT7- the seventh argument typeT8- the eigth argument typeT9- the ninth argument type- Parameters:
action- theAction9to convert- Returns:
- a
Func9that callsactionand returnsnull
-
toFunc
Converts anActionNto a function that calls the action and returnsnull. -
toFunc
Converts anAction0to a function that calls the action and returns a specified value. -
toFunc
Converts anAction1to a function that calls the action and returns a specified value. -
toFunc
Converts anAction2to a function that calls the action and returns a specified value. -
toFunc
Converts anAction3to a function that calls the action and returns a specified value. -
toFunc
public static <T1,T2, Func4<T1,T3, T4, R> T2, toFuncT3, T4, R> (Action4<T1, T2, T3, T4> action, R result) Converts anAction4to a function that calls the action and returns a specified value.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeR- the result type- Parameters:
action- theAction4to convertresult- the value to return from the function call- Returns:
- a
Func4that callsactionand returnsresult
-
toFunc
public static <T1,T2, Func5<T1,T3, T4, T5, R> T2, toFuncT3, T4, T5, R> (Action5<T1, T2, T3, T4, T5> action, R result) Converts anAction5to a function that calls the action and returns a specified value.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeR- the result type- Parameters:
action- theAction5to convertresult- the value to return from the function call- Returns:
- a
Func5that callsactionand returnsresult
-
toFunc
public static <T1,T2, Func6<T1,T3, T4, T5, T6, R> T2, toFuncT3, T4, T5, T6, R> (Action6<T1, T2, T3, T4, T5, T6> action, R result) Converts anAction6to a function that calls the action and returns a specified value.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeR- the result type- Parameters:
action- theAction6to convertresult- the value to return from the function call- Returns:
- a
Func6that callsactionand returnsresult
-
toFunc
public static <T1,T2, Func7<T1,T3, T4, T5, T6, T7, R> T2, toFuncT3, T4, T5, T6, T7, R> (Action7<T1, T2, T3, T4, T5, T6, T7> action, R result) Converts anAction7to a function that calls the action and returns a specified value.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeT7- the seventh argument typeR- the result type- Parameters:
action- theAction7to convertresult- the value to return from the function call- Returns:
- a
Func7that callsactionand returnsresult
-
toFunc
public static <T1,T2, Func8<T1,T3, T4, T5, T6, T7, T8, R> T2, toFuncT3, T4, T5, T6, T7, T8, R> (Action8<T1, T2, T3, T4, T5, T6, T7, T8> action, R result) Converts anAction8to a function that calls the action and returns a specified value.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeT7- the seventh argument typeT8- the eigth argument typeR- the result type- Parameters:
action- theAction8to convertresult- the value to return from the function call- Returns:
- a
Func8that callsactionand returnsresult
-
toFunc
public static <T1,T2, Func9<T1,T3, T4, T5, T6, T7, T8, T9, R> T2, toFuncT3, T4, T5, T6, T7, T8, T9, R> (Action9<T1, T2, T3, T4, T5, T6, T7, T8, T9> action, R result) Converts anAction9to a function that calls the action and returns a specified value.- Type Parameters:
T1- the first argument typeT2- the second argument typeT3- the third argument typeT4- the fourth argument typeT5- the fifth argument typeT6- the sixth argument typeT7- the seventh argument typeT8- the eigth argument typeT9- the ninth argument typeR- the result type- Parameters:
action- theAction9to convertresult- the value to return from the function call- Returns:
- a
Func9that callsactionand returnsresult
-
toFunc
Converts anActionNto a function that calls the action and returns a specified value. -
toAction1
Wraps an Action0 instance into an Action1 instance where the latter calls the former.- Type Parameters:
T- the first argument type- Parameters:
action- the action to call- Returns:
- the new Action1 instance
-