bc0026c3e1
Plus many new examples in "streams" chapter.
14 lines
324 B
Java
14 lines
324 B
Java
// onjava/TaskItem.java
|
|
// A Future and the Callable that produced it.
|
|
package onjava;
|
|
import java.util.concurrent.*;
|
|
|
|
public class TaskItem<R,C extends Callable<R>> {
|
|
public final Future<R> future;
|
|
public final C task;
|
|
public TaskItem(Future<R> future, C task) {
|
|
this.future = future;
|
|
this.task = task;
|
|
}
|
|
}
|