pq.java
4.6 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Lists;
import com.google.common.collect.Table.Cell;
import com.google.common.collect.UnmodifiableIterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable;
@GwtCompatible
public abstract class pq<R, C, V>
extends ImmutableTable<R, C, V>
{
public static final <R, C, V> pq<R, C, V> a(Iterable<Table.Cell<R, C, V>> paramIterable, @Nullable Comparator<? super R> paramComparator, @Nullable Comparator<? super C> paramComparator1)
{
Object localObject = ImmutableSet.builder();
ImmutableSet.Builder localBuilder = ImmutableSet.builder();
ImmutableList localImmutableList = ImmutableList.copyOf(paramIterable);
paramIterable = localImmutableList.iterator();
while (paramIterable.hasNext())
{
Table.Cell localCell = (Table.Cell)paramIterable.next();
((ImmutableSet.Builder)localObject).add(localCell.getRowKey());
localBuilder.add(localCell.getColumnKey());
}
localObject = ((ImmutableSet.Builder)localObject).build();
paramIterable = (Iterable<Table.Cell<R, C, V>>)localObject;
if (paramComparator != null)
{
paramIterable = Lists.newArrayList((Iterable)localObject);
Collections.sort(paramIterable, paramComparator);
paramIterable = ImmutableSet.copyOf(paramIterable);
}
localObject = localBuilder.build();
paramComparator = (Comparator<? super R>)localObject;
if (paramComparator1 != null)
{
paramComparator = Lists.newArrayList((Iterable)localObject);
Collections.sort(paramComparator, paramComparator1);
paramComparator = ImmutableSet.copyOf(paramComparator);
}
if (localImmutableList.size() > paramIterable.size() * paramComparator.size() / 2L) {
return new nr(localImmutableList, paramIterable, paramComparator);
}
return new qc(localImmutableList, paramIterable, paramComparator);
}
public static <R, C, V> pq<R, C, V> a(List<Table.Cell<R, C, V>> paramList, @Nullable Comparator<? super R> paramComparator, @Nullable final Comparator<? super C> paramComparator1)
{
Preconditions.checkNotNull(paramList);
if ((paramComparator != null) || (paramComparator1 != null)) {
Collections.sort(paramList, new Comparator() {});
}
return a(paramList, paramComparator, paramComparator1);
}
abstract Table.Cell<R, C, V> a(int paramInt);
abstract V b(int paramInt);
final ImmutableSet<Table.Cell<R, C, V>> e()
{
if (isEmpty()) {
return ImmutableSet.of();
}
return new pq.a((byte)0);
}
final ImmutableCollection<V> f()
{
if (isEmpty()) {
return ImmutableList.of();
}
return new pq.b((byte)0);
}
final class a
extends ImmutableSet<Table.Cell<R, C, V>>
{
private a() {}
final boolean a()
{
return false;
}
final ImmutableList<Table.Cell<R, C, V>> c()
{
new op()
{
final ImmutableCollection<Table.Cell<R, C, V>> b()
{
return pq.a.this;
}
};
}
public final boolean contains(@Nullable Object paramObject)
{
boolean bool2 = false;
boolean bool1 = bool2;
if ((paramObject instanceof Table.Cell))
{
paramObject = (Table.Cell)paramObject;
Object localObject = pq.this.get(((Table.Cell)paramObject).getRowKey(), ((Table.Cell)paramObject).getColumnKey());
bool1 = bool2;
if (localObject != null)
{
bool1 = bool2;
if (localObject.equals(((Table.Cell)paramObject).getValue())) {
bool1 = true;
}
}
}
return bool1;
}
public final UnmodifiableIterator<Table.Cell<R, C, V>> iterator()
{
return asList().iterator();
}
public final int size()
{
return pq.this.size();
}
}
final class b
extends ImmutableList<V>
{
private b() {}
final boolean a()
{
return true;
}
public final V get(int paramInt)
{
return (V)pq.this.b(paramInt);
}
public final int size()
{
return pq.this.size();
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/pq.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/