AbstractLoadingCache.java
1.54 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
package com.google.common.cache;
import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.UncheckedExecutionException;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
@Beta
public abstract class AbstractLoadingCache<K, V>
extends AbstractCache<K, V>
implements LoadingCache<K, V>
{
public final V apply(K paramK)
{
return (V)getUnchecked(paramK);
}
public ImmutableMap<K, V> getAll(Iterable<? extends K> paramIterable)
throws ExecutionException
{
LinkedHashMap localLinkedHashMap = Maps.newLinkedHashMap();
paramIterable = paramIterable.iterator();
while (paramIterable.hasNext())
{
Object localObject = paramIterable.next();
if (!localLinkedHashMap.containsKey(localObject)) {
localLinkedHashMap.put(localObject, get(localObject));
}
}
return ImmutableMap.copyOf(localLinkedHashMap);
}
public V getUnchecked(K paramK)
{
try
{
paramK = get(paramK);
return paramK;
}
catch (ExecutionException paramK)
{
throw new UncheckedExecutionException(paramK.getCause());
}
}
public void refresh(K paramK)
{
throw new UnsupportedOperationException();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/cache/AbstractLoadingCache.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/