ForkJoinTask.Adapt Method

Definition

Overloads

Adapt(IRunnable)

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns a null result upon #join.

Adapt(ICallable)

Returns a new ForkJoinTask that performs the call method of the given Callable as its action, and returns its result upon #join, translating any checked exceptions encountered into RuntimeException.

Adapt(IRunnable, Object)

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns the given result upon #join.

Adapt(IRunnable)

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns a null result upon #join.

[Android.Runtime.Register("adapt", "(Ljava/lang/Runnable;)Ljava/util/concurrent/ForkJoinTask;", "")]
public static Java.Util.Concurrent.ForkJoinTask? Adapt (Java.Lang.IRunnable? runnable);
[<Android.Runtime.Register("adapt", "(Ljava/lang/Runnable;)Ljava/util/concurrent/ForkJoinTask;", "")>]
static member Adapt : Java.Lang.IRunnable -> Java.Util.Concurrent.ForkJoinTask

Parameters

runnable
IRunnable

the runnable action

Returns

the task

Attributes

Remarks

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns a null result upon #join.

Java documentation for java.util.concurrent.ForkJoinTask.adapt(java.lang.Runnable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Adapt(ICallable)

Returns a new ForkJoinTask that performs the call method of the given Callable as its action, and returns its result upon #join, translating any checked exceptions encountered into RuntimeException.

[Android.Runtime.Register("adapt", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ForkJoinTask;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Concurrent.ForkJoinTask? Adapt (Java.Util.Concurrent.ICallable? callable);
[<Android.Runtime.Register("adapt", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ForkJoinTask;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Adapt : Java.Util.Concurrent.ICallable -> Java.Util.Concurrent.ForkJoinTask

Parameters

callable
ICallable

the callable action

Returns

the task

Attributes

Remarks

Returns a new ForkJoinTask that performs the call method of the given Callable as its action, and returns its result upon #join, translating any checked exceptions encountered into RuntimeException.

Java documentation for java.util.concurrent.ForkJoinTask.adapt(java.util.concurrent.Callable<? extends T>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Adapt(IRunnable, Object)

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns the given result upon #join.

[Android.Runtime.Register("adapt", "(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/ForkJoinTask;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Concurrent.ForkJoinTask? Adapt (Java.Lang.IRunnable? runnable, Java.Lang.Object? result);
[<Android.Runtime.Register("adapt", "(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/ForkJoinTask;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Adapt : Java.Lang.IRunnable * Java.Lang.Object -> Java.Util.Concurrent.ForkJoinTask

Parameters

runnable
IRunnable

the runnable action

result
Object

the result upon completion

Returns

the task

Attributes

Remarks

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns the given result upon #join.

Java documentation for java.util.concurrent.ForkJoinTask.adapt(java.lang.Runnable, T).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to