1 |
|
package com.dreamcatcher.bicycle.core; |
2 |
|
|
3 |
|
import java.util.Vector; |
4 |
|
|
5 |
|
import com.dreamcatcher.bicycle.interfaces.IHttpEvent; |
6 |
|
import com.dreamcatcher.bicycle.vo.BicycleNumberInfo; |
7 |
|
|
|
|
| 57,1% |
Uncovered Elements: 9 (21) |
Complexity: 8 |
Complexity Density: 0,73 |
|
8 |
|
public class HttpEventListener implements IHttpEvent { |
9 |
|
private Vector<IHttpEvent> mEvents = null; |
10 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
11 |
1
|
public HttpEventListener(){... |
12 |
1
|
mEvents = new Vector<IHttpEvent>(); |
13 |
|
} |
14 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
15 |
3
|
public void onAllBicyclesInfoReceived(int resultCode) {... |
16 |
3
|
for(IHttpEvent event : mEvents){ |
17 |
6
|
event.onAllBicyclesInfoReceived(resultCode); |
18 |
|
} |
19 |
|
} |
20 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
21 |
0
|
public void onSingleBicycleNumberInfoReceived(... |
22 |
|
BicycleNumberInfo bicycleNumberInfo, int resultCode) { |
23 |
0
|
for(IHttpEvent event : mEvents){ |
24 |
0
|
event.onSingleBicycleNumberInfoReceived(bicycleNumberInfo, resultCode); |
25 |
|
} |
26 |
|
} |
27 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
28 |
1
|
public void onNewVersionCheckCompleted(boolean needUpdate, int resultCode) {... |
29 |
1
|
for(IHttpEvent event : mEvents){ |
30 |
3
|
event.onNewVersionCheckCompleted(needUpdate, resultCode); |
31 |
|
} |
32 |
|
} |
33 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
34 |
3
|
public void addEvent(IHttpEvent event){... |
35 |
3
|
if(!mEvents.contains(event)){ |
36 |
3
|
mEvents.add(event); |
37 |
|
} |
38 |
|
} |
39 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
40 |
0
|
public void removeEvent(IHttpEvent event){... |
41 |
0
|
if(mEvents.contains(event)){ |
42 |
0
|
mEvents.remove(event); |
43 |
|
} |
44 |
|
} |
45 |
|
|
46 |
|
} |