/** * This method will increment values of this counter, by counts of other counter * * @param other */ public void incrementAll(CounterMap<F, S> other) { for (Map.Entry<F, Counter<S>> entry : other.maps.entrySet()) { F key = entry.getKey(); Counter<S> innerCounter = entry.getValue(); for (Map.Entry<S, AtomicDouble> innerEntry : innerCounter.entrySet()) { S value = innerEntry.getKey(); incrementCount(key, value, innerEntry.getValue().get()); } } }
/** * This method will increment values of this counter, by counts of other counter * * @param other */ public void incrementAll(CounterMap<F, S> other) { for (Map.Entry<F, Counter<S>> entry : other.maps.entrySet()) { F key = entry.getKey(); Counter<S> innerCounter = entry.getValue(); for (Map.Entry<S, AtomicDouble> innerEntry : innerCounter.entrySet()) { S value = innerEntry.getKey(); incrementCount(key, value, innerEntry.getValue().get()); } } }