oh.java
5.5 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import com.google.common.collect.ForwardingCollection;
import com.google.common.collect.ForwardingList;
import com.google.common.collect.ForwardingSet;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multiset;
import com.google.common.collect.Multisets;
import com.google.common.collect.SetMultimap;
import com.google.common.collect.Sets;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.annotation.Nullable;
@GwtCompatible
public class oh<K, V>
extends mx<K, V>
implements oj<K, V>
{
public final Multimap<K, V> a;
public final Predicate<? super K> b;
public oh(Multimap<K, V> paramMultimap, Predicate<? super K> paramPredicate)
{
this.a = ((Multimap)Preconditions.checkNotNull(paramMultimap));
this.b = ((Predicate)Preconditions.checkNotNull(paramPredicate));
}
public Multimap<K, V> a()
{
return this.a;
}
public final Predicate<? super Map.Entry<K, V>> b()
{
return Maps.a(this.b);
}
public void clear()
{
keySet().clear();
}
public boolean containsKey(@Nullable Object paramObject)
{
if (this.a.containsKey(paramObject)) {
return this.b.apply(paramObject);
}
return false;
}
final Set<K> e()
{
return Sets.filter(this.a.keySet(), this.b);
}
final Iterator<Map.Entry<K, V>> g()
{
throw new AssertionError("should never be called");
}
public Collection<V> get(K paramK)
{
if (this.b.apply(paramK)) {
return this.a.get(paramK);
}
if ((this.a instanceof SetMultimap)) {
return new oh.b(paramK);
}
return new oh.a(paramK);
}
final Map<K, Collection<V>> h()
{
return Maps.filterKeys(this.a.asMap(), this.b);
}
Collection<Map.Entry<K, V>> i()
{
return new oh.c();
}
final Multiset<K> j()
{
return Multisets.filter(this.a.keys(), this.b);
}
final Collection<V> k()
{
return new ok(this);
}
public Collection<V> removeAll(Object paramObject)
{
if (containsKey(paramObject)) {
return this.a.removeAll(paramObject);
}
if ((this.a instanceof SetMultimap)) {
return ImmutableSet.of();
}
return ImmutableList.of();
}
public int size()
{
Iterator localIterator = asMap().values().iterator();
for (int i = 0; localIterator.hasNext(); i = ((Collection)localIterator.next()).size() + i) {}
return i;
}
static final class a<K, V>
extends ForwardingList<V>
{
final K a;
a(K paramK)
{
this.a = paramK;
}
public final void add(int paramInt, V paramV)
{
Preconditions.checkPositionIndex(paramInt, 0);
paramV = String.valueOf(String.valueOf(this.a));
throw new IllegalArgumentException(paramV.length() + 32 + "Key does not satisfy predicate: " + paramV);
}
public final boolean add(V paramV)
{
add(0, paramV);
return true;
}
public final boolean addAll(int paramInt, Collection<? extends V> paramCollection)
{
Preconditions.checkNotNull(paramCollection);
Preconditions.checkPositionIndex(paramInt, 0);
paramCollection = String.valueOf(String.valueOf(this.a));
throw new IllegalArgumentException(paramCollection.length() + 32 + "Key does not satisfy predicate: " + paramCollection);
}
public final boolean addAll(Collection<? extends V> paramCollection)
{
addAll(0, paramCollection);
return true;
}
protected final List<V> delegate()
{
return Collections.emptyList();
}
}
static final class b<K, V>
extends ForwardingSet<V>
{
final K a;
b(K paramK)
{
this.a = paramK;
}
public final boolean add(V paramV)
{
paramV = String.valueOf(String.valueOf(this.a));
throw new IllegalArgumentException(paramV.length() + 32 + "Key does not satisfy predicate: " + paramV);
}
public final boolean addAll(Collection<? extends V> paramCollection)
{
Preconditions.checkNotNull(paramCollection);
paramCollection = String.valueOf(String.valueOf(this.a));
throw new IllegalArgumentException(paramCollection.length() + 32 + "Key does not satisfy predicate: " + paramCollection);
}
protected final Set<V> delegate()
{
return Collections.emptySet();
}
}
class c
extends ForwardingCollection<Map.Entry<K, V>>
{
c() {}
protected Collection<Map.Entry<K, V>> delegate()
{
return Collections2.filter(oh.this.a.entries(), Maps.a(oh.this.b));
}
public boolean remove(@Nullable Object paramObject)
{
if ((paramObject instanceof Map.Entry))
{
paramObject = (Map.Entry)paramObject;
if ((oh.this.a.containsKey(((Map.Entry)paramObject).getKey())) && (oh.this.b.apply(((Map.Entry)paramObject).getKey()))) {
return oh.this.a.remove(((Map.Entry)paramObject).getKey(), ((Map.Entry)paramObject).getValue());
}
}
return false;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/oh.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/