Revision 48139
Added by Alessia Bardi almost 7 years ago
HostedByCounters.java | ||
---|---|---|
7 | 7 |
import com.google.common.collect.Maps; |
8 | 8 |
|
9 | 9 |
public class HostedByCounters { |
10 |
|
|
10 | 11 |
private Map<String, Integer> counters = Maps.newHashMap(); |
11 |
|
|
12 |
|
|
12 | 13 |
public void increaseCounter(final String dsId) { |
13 | 14 |
int val = counters.containsKey(dsId) ? counters.get(dsId) + 1 : 1; |
14 | 15 |
counters.put(dsId, val); |
15 | 16 |
} |
16 |
|
|
17 |
|
|
17 | 18 |
public Map<String, Integer> getCounters() { |
18 | 19 |
return counters; |
19 | 20 |
} |
Also available in: Unified diff
integrated (hopefully) all required changes from dnet40