mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
commit
8a7de69948
1 changed files with 6 additions and 2 deletions
|
@ -57,8 +57,12 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
|
|||
}
|
||||
|
||||
public void addCounter(Counter counter) {
|
||||
putIfAbsent(counter.name, counter);
|
||||
if (!containsKey(counter.name)) {
|
||||
put(counter.name, counter);
|
||||
} else {
|
||||
|
||||
get(counter.name).add(counter.getCount());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue