mv.java
5.22 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
222
223
224
225
226
227
228
229
230
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import com.google.common.collect.Multiset.Entry;
import com.google.common.collect.Multisets.a;
import com.google.common.primitives.Ints;
import java.io.Serializable;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.annotation.Nullable;
@GwtCompatible(emulated=true)
public abstract class mv<E>
extends my<E>
implements Serializable
{
@GwtIncompatible("not needed in emulated source.")
private static final long serialVersionUID = -2250766705698539974L;
protected transient Map<E, np> a;
private transient long b;
protected mv(Map<E, np> paramMap)
{
this.a = ((Map)Preconditions.checkNotNull(paramMap));
this.b = super.size();
}
private static int a(np paramnp, int paramInt)
{
if (paramnp == null) {
return 0;
}
return paramnp.b(paramInt);
}
final Iterator<Multiset.Entry<E>> a()
{
new Iterator()
{
Map.Entry<E, np> a;
public final boolean hasNext()
{
return this.b.hasNext();
}
public final void remove()
{
if (this.a != null) {}
for (boolean bool = true;; bool = false)
{
Preconditions.checkState(bool, "no calls to next() since the last call to remove()");
mv.a(mv.this, ((np)this.a.getValue()).b(0));
this.b.remove();
this.a = null;
return;
}
}
};
}
public int add(@Nullable E paramE, int paramInt)
{
int i = 0;
if (paramInt == 0) {
return count(paramE);
}
if (paramInt > 0) {}
np localnp;
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool, "occurrences cannot be negative: %s", new Object[] { Integer.valueOf(paramInt) });
localnp = (np)this.a.get(paramE);
if (localnp != null) {
break;
}
this.a.put(paramE, new np(paramInt));
this.b += paramInt;
return i;
}
i = localnp.a;
long l = i + paramInt;
if (l <= 2147483647L) {}
for (bool = true;; bool = false)
{
Preconditions.checkArgument(bool, "too many occurrences: %s", new Object[] { Long.valueOf(l) });
localnp.a += paramInt;
break;
}
}
final int b()
{
return this.a.size();
}
public void clear()
{
Iterator localIterator = this.a.values().iterator();
while (localIterator.hasNext()) {
((np)localIterator.next()).a = 0;
}
this.a.clear();
this.b = 0L;
}
public int count(@Nullable Object paramObject)
{
paramObject = (np)Maps.a(this.a, paramObject);
if (paramObject == null) {
return 0;
}
return ((np)paramObject).a;
}
public Set<Multiset.Entry<E>> entrySet()
{
return super.entrySet();
}
public Iterator<E> iterator()
{
return new mv.a();
}
public int remove(@Nullable Object paramObject, int paramInt)
{
int i = 0;
if (paramInt == 0)
{
i = count(paramObject);
return i;
}
if (paramInt > 0) {}
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool, "occurrences cannot be negative: %s", new Object[] { Integer.valueOf(paramInt) });
np localnp = (np)this.a.get(paramObject);
if (localnp == null) {
break;
}
int j = localnp.a;
i = paramInt;
if (j <= paramInt)
{
this.a.remove(paramObject);
i = j;
}
localnp.a(-i);
this.b -= i;
return j;
}
}
public int setCount(@Nullable E paramE, int paramInt)
{
nj.a(paramInt, "count");
int i;
if (paramInt == 0) {
i = a((np)this.a.remove(paramE), paramInt);
}
for (;;)
{
this.b += paramInt - i;
return i;
np localnp = (np)this.a.get(paramE);
i = a(localnp, paramInt);
if (localnp == null) {
this.a.put(paramE, new np(paramInt));
}
}
}
public int size()
{
return Ints.saturatedCast(this.b);
}
final class a
implements Iterator<E>
{
final Iterator<Map.Entry<E, np>> a = mv.a(mv.this).entrySet().iterator();
Map.Entry<E, np> b;
int c;
boolean d;
a() {}
public final boolean hasNext()
{
return (this.c > 0) || (this.a.hasNext());
}
public final E next()
{
if (this.c == 0)
{
this.b = ((Map.Entry)this.a.next());
this.c = ((np)this.b.getValue()).a;
}
this.c -= 1;
this.d = true;
return (E)this.b.getKey();
}
public final void remove()
{
Preconditions.checkState(this.d, "no calls to next() since the last call to remove()");
if (((np)this.b.getValue()).a <= 0) {
throw new ConcurrentModificationException();
}
if (((np)this.b.getValue()).a(-1) == 0) {
this.a.remove();
}
mv.b(mv.this);
this.d = false;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/mv.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/