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 anAction0
to a function that calls the action and returnsnull
.static <R> Func0
<R> Converts anAction0
to a function that calls the action and returns a specified value.Converts anAction1
to a function that calls the action and returnsnull
.static <T1,
R> Func1 <T1, R> Converts anAction1
to a function that calls the action and returns a specified value.Converts anAction2
to a function that calls the action and returnsnull
.static <T1,
T2, R>
Func2<T1, T2, R> Converts anAction2
to a function that calls the action and returns a specified value.Converts anAction3
to a function that calls the action and returnsnull
.static <T1,
T2, T3, R>
Func3<T1, T2, T3, R> Converts anAction3
to a function that calls the action and returns a specified value.Converts anAction4
to a function that calls the action and returnsnull
.static <T1,
T2, T3, T4, R>
Func4<T1, T2, T3, T4, R> Converts anAction4
to a function that calls the action and returns a specified value.Converts anAction5
to a function that calls the action and returnsnull
.static <T1,
T2, T3, T4, T5, R>
Func5<T1, T2, T3, T4, T5, R> Converts anAction5
to a function that calls the action and returns a specified value.Converts anAction6
to 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 anAction6
to a function that calls the action and returns a specified value.Converts anAction7
to 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 anAction7
to a function that calls the action and returns a specified value.Converts anAction8
to 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 anAction8
to a function that calls the action and returns a specified value.Converts anAction9
to 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 anAction9
to a function that calls the action and returns a specified value.Converts anActionN
to a function that calls the action and returnsnull
.static <R> FuncN
<R> Converts anActionN
to 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 anAction0
to a function that calls the action and returnsnull
. -
toFunc
Converts anAction1
to a function that calls the action and returnsnull
. -
toFunc
Converts anAction2
to a function that calls the action and returnsnull
. -
toFunc
Converts anAction3
to a function that calls the action and returnsnull
. -
toFunc
Converts anAction4
to 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 anAction5
to 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 anAction6
to 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 anAction7
to 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
- theAction7
to convert- Returns:
- a
Func7
that callsaction
and 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 anAction8
to 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
- theAction8
to convert- Returns:
- a
Func8
that callsaction
and 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 anAction9
to 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
- theAction9
to convert- Returns:
- a
Func9
that callsaction
and returnsnull
-
toFunc
Converts anActionN
to a function that calls the action and returnsnull
. -
toFunc
Converts anAction0
to a function that calls the action and returns a specified value. -
toFunc
Converts anAction1
to a function that calls the action and returns a specified value. -
toFunc
Converts anAction2
to a function that calls the action and returns a specified value. -
toFunc
Converts anAction3
to 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 anAction4
to 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
- theAction4
to convertresult
- the value to return from the function call- Returns:
- a
Func4
that callsaction
and 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 anAction5
to 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
- theAction5
to convertresult
- the value to return from the function call- Returns:
- a
Func5
that callsaction
and 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 anAction6
to 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
- theAction6
to convertresult
- the value to return from the function call- Returns:
- a
Func6
that callsaction
and 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 anAction7
to 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
- theAction7
to convertresult
- the value to return from the function call- Returns:
- a
Func7
that callsaction
and 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 anAction8
to 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
- theAction8
to convertresult
- the value to return from the function call- Returns:
- a
Func8
that callsaction
and 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 anAction9
to 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
- theAction9
to convertresult
- the value to return from the function call- Returns:
- a
Func9
that callsaction
and returnsresult
-
toFunc
Converts anActionN
to 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
-