ForwardingFuture.java
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.google.common.util.concurrent;
import com.google.common.base.Preconditions;
import com.google.common.collect.ForwardingObject;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public abstract class ForwardingFuture<V>
extends ForwardingObject
implements Future<V>
{
public boolean cancel(boolean paramBoolean)
{
return delegate().cancel(paramBoolean);
}
protected abstract Future<V> delegate();
public V get()
throws InterruptedException, ExecutionException
{
return (V)delegate().get();
}
public V get(long paramLong, TimeUnit paramTimeUnit)
throws InterruptedException, ExecutionException, TimeoutException
{
return (V)delegate().get(paramLong, paramTimeUnit);
}
public boolean isCancelled()
{
return delegate().isCancelled();
}
public boolean isDone()
{
return delegate().isDone();
}
public static abstract class SimpleForwardingFuture<V>
extends ForwardingFuture<V>
{
private final Future<V> a;
protected SimpleForwardingFuture(Future<V> paramFuture)
{
this.a = ((Future)Preconditions.checkNotNull(paramFuture));
}
protected final Future<V> delegate()
{
return this.a;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/util/concurrent/ForwardingFuture.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/