java.util.concurrent.Executors Maven / Gradle / Ivy
The newest version!
// CHECKSTYLE_OFF: Copyrighted to members of JCP JSR-166 Expert Group.
/*
* This file is a modified version of
* http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/Executors.java?revision=1.90
* which contained the following notice:
*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
// CHECKSTYLE_ON
package java.util.concurrent;
/**
* Emulation of executors.
*/
public class Executors {
public static Callable callable(Runnable task, T result) {
if (task == null) {
throw new NullPointerException();
}
return new RunnableAdapter(task, result);
}
public static Callable