BatchingListUpdateCallback.java
2.12 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
package android.support.v7.util;
public class BatchingListUpdateCallback
implements ListUpdateCallback
{
final ListUpdateCallback a;
int b = 0;
int c = -1;
int d = -1;
Object e = null;
public BatchingListUpdateCallback(ListUpdateCallback paramListUpdateCallback)
{
this.a = paramListUpdateCallback;
}
public void dispatchLastEvent()
{
if (this.b == 0) {
return;
}
switch (this.b)
{
}
for (;;)
{
this.e = null;
this.b = 0;
return;
this.a.onInserted(this.c, this.d);
continue;
this.a.onRemoved(this.c, this.d);
continue;
this.a.onChanged(this.c, this.d, this.e);
}
}
public void onChanged(int paramInt1, int paramInt2, Object paramObject)
{
if ((this.b == 3) && (paramInt1 <= this.c + this.d) && (paramInt1 + paramInt2 >= this.c) && (this.e == paramObject))
{
int i = this.c;
int j = this.d;
this.c = Math.min(paramInt1, this.c);
this.d = (Math.max(i + j, paramInt1 + paramInt2) - this.c);
return;
}
dispatchLastEvent();
this.c = paramInt1;
this.d = paramInt2;
this.e = paramObject;
this.b = 3;
}
public void onInserted(int paramInt1, int paramInt2)
{
if ((this.b == 1) && (paramInt1 >= this.c) && (paramInt1 <= this.c + this.d))
{
this.d += paramInt2;
this.c = Math.min(paramInt1, this.c);
return;
}
dispatchLastEvent();
this.c = paramInt1;
this.d = paramInt2;
this.b = 1;
}
public void onMoved(int paramInt1, int paramInt2)
{
dispatchLastEvent();
this.a.onMoved(paramInt1, paramInt2);
}
public void onRemoved(int paramInt1, int paramInt2)
{
if ((this.b == 2) && (this.c >= paramInt1) && (this.c <= paramInt1 + paramInt2))
{
this.d += paramInt2;
this.c = paramInt1;
return;
}
dispatchLastEvent();
this.c = paramInt1;
this.d = paramInt2;
this.b = 2;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/util/BatchingListUpdateCallback.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/