g.java
1.8 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
65
66
67
68
69
70
71
72
73
74
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.util.Pools.Pool;
import android.support.v4.util.Pools.SimplePool;
import android.support.v4.util.SimpleArrayMap;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
public final class g<T>
{
public final Pools.Pool<ArrayList<T>> a = new Pools.SimplePool(10);
public final SimpleArrayMap<T, ArrayList<T>> b = new SimpleArrayMap();
private final ArrayList<T> c = new ArrayList();
private final HashSet<T> d = new HashSet();
private void a(T paramT, ArrayList<T> paramArrayList, HashSet<T> paramHashSet)
{
if (paramArrayList.contains(paramT)) {
return;
}
if (paramHashSet.contains(paramT)) {
throw new RuntimeException("This graph contains cyclic dependencies");
}
paramHashSet.add(paramT);
ArrayList localArrayList = (ArrayList)this.b.get(paramT);
if (localArrayList != null)
{
int i = 0;
int j = localArrayList.size();
while (i < j)
{
a(localArrayList.get(i), paramArrayList, paramHashSet);
i += 1;
}
}
paramHashSet.remove(paramT);
paramArrayList.add(paramT);
}
@NonNull
public final ArrayList<T> a()
{
this.c.clear();
this.d.clear();
int i = 0;
int j = this.b.size();
while (i < j)
{
a(this.b.keyAt(i), this.c, this.d);
i += 1;
}
return this.c;
}
public final void a(@NonNull T paramT)
{
if (!this.b.containsKey(paramT)) {
this.b.put(paramT, null);
}
}
@Nullable
public final List b(@NonNull T paramT)
{
return (List)this.b.get(paramT);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/g.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/