public class ComparableRunnableFuture<T,C extends Comparable<C>> extends Object implements RunnableFuture<T>, Comparable<ComparableRunnableFuture<T,C>>
| Constructor and Description |
|---|
ComparableRunnableFuture(RunnableFuture<T> future,
C comparable) |
public ComparableRunnableFuture(RunnableFuture<T> future, C comparable)
public boolean cancel(boolean mayInterruptIfRunning)
public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean isCancelled()
isCancelled in interface Future<T>public void run()
run in interface Runnablerun in interface RunnableFuture<T>public int compareTo(ComparableRunnableFuture<T,C> future)
compareTo in interface Comparable<ComparableRunnableFuture<T,C extends Comparable<C>>>Copyright © 2013 JBoss by Red Hat. All rights reserved.