public final class Actions
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T0,T1,T2,T3,T4,T5,T6,T7,T8> |
empty() |
static Action1<java.lang.Throwable> |
errorNotImplemented()
Returns an action which throws OnErrorNotImplementedException.
|
static <T> Action1<T> |
toAction1(Action0 action)
Wraps an Action0 instance into an Action1 instance where the latter calls
the former.
|
static Func0<java.lang.Void> |
toFunc(Action0 action)
Converts an
Action0 to a function that calls the action and returns null . |
static <R> Func0<R> |
toFunc(Action0 action,
R result)
Converts an
Action0 to a function that calls the action and returns a specified value. |
static <T1> Func1<T1,java.lang.Void> |
toFunc(Action1<T1> action)
Converts an
Action1 to a function that calls the action and returns null . |
static <T1,R> Func1<T1,R> |
toFunc(Action1<T1> action,
R result)
Converts an
Action1 to a function that calls the action and returns a specified value. |
static <T1,T2> Func2<T1,T2,java.lang.Void> |
toFunc(Action2<T1,T2> action)
Converts an
Action2 to a function that calls the action and returns null . |
static <T1,T2,R> Func2<T1,T2,R> |
toFunc(Action2<T1,T2> action,
R result)
Converts an
Action2 to a function that calls the action and returns a specified value. |
static <T1,T2,T3> Func3<T1,T2,T3,java.lang.Void> |
toFunc(Action3<T1,T2,T3> action)
Converts an
Action3 to a function that calls the action and returns null . |
static <T1,T2,T3,R> |
toFunc(Action3<T1,T2,T3> action,
R result)
Converts an
Action3 to a function that calls the action and returns a specified value. |
static <T1,T2,T3,T4> |
toFunc(Action4<T1,T2,T3,T4> action)
Converts an
Action4 to a function that calls the action and returns null . |
static <T1,T2,T3,T4,R> |
toFunc(Action4<T1,T2,T3,T4> action,
R result)
Converts an
Action4 to a function that calls the action and returns a specified value. |
static <T1,T2,T3,T4,T5> |
toFunc(Action5<T1,T2,T3,T4,T5> action)
Converts an
Action5 to a function that calls the action and returns null . |
static <T1,T2,T3,T4,T5,R> |
toFunc(Action5<T1,T2,T3,T4,T5> action,
R result)
Converts an
Action5 to a function that calls the action and returns a specified value. |
static <T1,T2,T3,T4,T5,T6> |
toFunc(Action6<T1,T2,T3,T4,T5,T6> action)
Converts an
Action6 to a function that calls the action and returns null . |
static <T1,T2,T3,T4,T5,T6,R> |
toFunc(Action6<T1,T2,T3,T4,T5,T6> action,
R result)
Converts an
Action6 to a function that calls the action and returns a specified value. |
static <T1,T2,T3,T4,T5,T6,T7> |
toFunc(Action7<T1,T2,T3,T4,T5,T6,T7> action)
Converts an
Action7 to a function that calls the action and returns null . |
static <T1,T2,T3,T4,T5,T6,T7,R> |
toFunc(Action7<T1,T2,T3,T4,T5,T6,T7> action,
R result)
Converts an
Action7 to a function that calls the action and returns a specified value. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
toFunc(Action8<T1,T2,T3,T4,T5,T6,T7,T8> action)
Converts an
Action8 to a function that calls the action and returns null . |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
toFunc(Action8<T1,T2,T3,T4,T5,T6,T7,T8> action,
R result)
Converts an
Action8 to a function that calls the action and returns a specified value. |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
toFunc(Action9<T1,T2,T3,T4,T5,T6,T7,T8,T9> action)
Converts an
Action9 to a function that calls the action and returns null . |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> |
toFunc(Action9<T1,T2,T3,T4,T5,T6,T7,T8,T9> action,
R result)
Converts an
Action9 to a function that calls the action and returns a specified value. |
static FuncN<java.lang.Void> |
toFunc(ActionN action)
Converts an
ActionN to a function that calls the action and returns null . |
static <R> FuncN<R> |
toFunc(ActionN action,
R result)
Converts an
ActionN to a function that calls the action and returns a specified value. |
public static <T0,T1,T2,T3,T4,T5,T6,T7,T8> rx.functions.Actions.EmptyAction<T0,T1,T2,T3,T4,T5,T6,T7,T8> empty()
public static Func0<java.lang.Void> toFunc(Action0 action)
Action0
to a function that calls the action and returns null
.public static <T1> Func1<T1,java.lang.Void> toFunc(Action1<T1> action)
Action1
to a function that calls the action and returns null
.public static <T1,T2> Func2<T1,T2,java.lang.Void> toFunc(Action2<T1,T2> action)
Action2
to a function that calls the action and returns null
.public static <T1,T2,T3> Func3<T1,T2,T3,java.lang.Void> toFunc(Action3<T1,T2,T3> action)
Action3
to a function that calls the action and returns null
.public static <T1,T2,T3,T4> Func4<T1,T2,T3,T4,java.lang.Void> toFunc(Action4<T1,T2,T3,T4> action)
Action4
to a function that calls the action and returns null
.public static <T1,T2,T3,T4,T5> Func5<T1,T2,T3,T4,T5,java.lang.Void> toFunc(Action5<T1,T2,T3,T4,T5> action)
Action5
to a function that calls the action and returns null
.public static <T1,T2,T3,T4,T5,T6> Func6<T1,T2,T3,T4,T5,T6,java.lang.Void> toFunc(Action6<T1,T2,T3,T4,T5,T6> action)
Action6
to a function that calls the action and returns null
.public static <T1,T2,T3,T4,T5,T6,T7> Func7<T1,T2,T3,T4,T5,T6,T7,java.lang.Void> toFunc(Action7<T1,T2,T3,T4,T5,T6,T7> action)
Action7
to a function that calls the action and returns null
.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 typeaction
- the Action7
to convertFunc7
that calls action
and returns null
public static <T1,T2,T3,T4,T5,T6,T7,T8> Func8<T1,T2,T3,T4,T5,T6,T7,T8,java.lang.Void> toFunc(Action8<T1,T2,T3,T4,T5,T6,T7,T8> action)
Action8
to a function that calls the action and returns null
.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 eighth argument typeaction
- the Action8
to convertFunc8
that calls action
and returns null
public static <T1,T2,T3,T4,T5,T6,T7,T8,T9> Func9<T1,T2,T3,T4,T5,T6,T7,T8,T9,java.lang.Void> toFunc(Action9<T1,T2,T3,T4,T5,T6,T7,T8,T9> action)
Action9
to a function that calls the action and returns null
.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 eighth argument typeT9
- the ninth argument typeaction
- the Action9
to convertFunc9
that calls action
and returns null
public static FuncN<java.lang.Void> toFunc(ActionN action)
ActionN
to a function that calls the action and returns null
.public static <R> Func0<R> toFunc(Action0 action, R result)
Action0
to a function that calls the action and returns a specified value.public static <T1,R> Func1<T1,R> toFunc(Action1<T1> action, R result)
Action1
to a function that calls the action and returns a specified value.public static <T1,T2,R> Func2<T1,T2,R> toFunc(Action2<T1,T2> action, R result)
Action2
to a function that calls the action and returns a specified value.public static <T1,T2,T3,R> Func3<T1,T2,T3,R> toFunc(Action3<T1,T2,T3> action, R result)
Action3
to a function that calls the action and returns a specified value.public static <T1,T2,T3,T4,R> Func4<T1,T2,T3,T4,R> toFunc(Action4<T1,T2,T3,T4> action, R result)
Action4
to a function that calls the action and returns a specified value.T1
- the first argument typeT2
- the second argument typeT3
- the third argument typeT4
- the fourth argument typeR
- the result typeaction
- the Action4
to convertresult
- the value to return from the function callFunc4
that calls action
and returns result
public static <T1,T2,T3,T4,T5,R> Func5<T1,T2,T3,T4,T5,R> toFunc(Action5<T1,T2,T3,T4,T5> action, R result)
Action5
to a function that calls the action and returns a specified value.T1
- the first argument typeT2
- the second argument typeT3
- the third argument typeT4
- the fourth argument typeT5
- the fifth argument typeR
- the result typeaction
- the Action5
to convertresult
- the value to return from the function callFunc5
that calls action
and returns result
public static <T1,T2,T3,T4,T5,T6,R> Func6<T1,T2,T3,T4,T5,T6,R> toFunc(Action6<T1,T2,T3,T4,T5,T6> action, R result)
Action6
to a function that calls the action and returns a specified value.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 typeaction
- the Action6
to convertresult
- the value to return from the function callFunc6
that calls action
and returns result
public static <T1,T2,T3,T4,T5,T6,T7,R> Func7<T1,T2,T3,T4,T5,T6,T7,R> toFunc(Action7<T1,T2,T3,T4,T5,T6,T7> action, R result)
Action7
to a function that calls the action and returns a specified value.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 typeaction
- the Action7
to convertresult
- the value to return from the function callFunc7
that calls action
and returns result
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> Func8<T1,T2,T3,T4,T5,T6,T7,T8,R> toFunc(Action8<T1,T2,T3,T4,T5,T6,T7,T8> action, R result)
Action8
to a function that calls the action and returns a specified value.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 eighth argument typeR
- the result typeaction
- the Action8
to convertresult
- the value to return from the function callFunc8
that calls action
and returns result
public static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> Func9<T1,T2,T3,T4,T5,T6,T7,T8,T9,R> toFunc(Action9<T1,T2,T3,T4,T5,T6,T7,T8,T9> action, R result)
Action9
to a function that calls the action and returns a specified value.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 eighth argument typeT9
- the ninth argument typeR
- the result typeaction
- the Action9
to convertresult
- the value to return from the function callFunc9
that calls action
and returns result
public static <R> FuncN<R> toFunc(ActionN action, R result)
ActionN
to a function that calls the action and returns a specified value.public static <T> Action1<T> toAction1(Action0 action)
T
- the first argument typeaction
- the action to callpublic static Action1<java.lang.Throwable> errorNotImplemented()