forked from External/mage
rewrote enum comparisons, iterator to removeIf, added some stream and filters
This commit is contained in:
parent
05e5ca3c78
commit
3a152ab3d6
41 changed files with 178 additions and 239 deletions
|
|
@ -57,11 +57,9 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
|
|||
}
|
||||
|
||||
public void addCounter(Counter counter) {
|
||||
if (!this.containsKey(counter.name)) {
|
||||
put(counter.name, counter);
|
||||
} else {
|
||||
get(counter.name).add(counter.getCount());
|
||||
}
|
||||
putIfAbsent(counter.name, counter);
|
||||
get(counter.name).add(counter.getCount());
|
||||
|
||||
}
|
||||
|
||||
public boolean removeCounter(String name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue