@Test(expected = IllegalArgumentException.class) public void currentValue_NOT_VALID_COUNTER_NAME() { NamedCounters namedCounters = new NamedCounters(new String[] {counterName1, counterName2}); namedCounters.currentValue("NOT_EXISTING_COUNTER"); }
public long currentValue(String counterName) { if (!counters.containsKey(counterName)) { throw new IllegalArgumentException("Couldn't find counter with name: " + counterName); } return counters.get(counterName); }
NamedCounters implements Serializable { public long currentValue(String counterName) { if (!counters.containsKey(counterName)) { throw new IllegalArgumentException("Couldn't find counter with name: " + counterName); } return counters.get(counterName); } }
NamedCounters implements Serializable { public long currentValue(String counterName) { if (!counters.containsKey(counterName)) { throw new IllegalArgumentException("Couldn't find counter with name: " + counterName); } return counters.get(counterName); } NamedCounters();  NamedCounters(String[] initialCounterNames); <E extends Enum<E>> NamedCounters(Class<E> initialCounterNamesEnumClass); }
NamedCounters implements Serializable { public long currentValue(String counterName) { if (!counters.containsKey(counterName)) { throw new IllegalArgumentException("Couldn't find counter with name: " + counterName); } return counters.get(counterName); } NamedCounters();  NamedCounters(String[] initialCounterNames); <E extends Enum<E>> NamedCounters(Class<E> initialCounterNamesEnumClass); void increment(String counterName); void increment(String counterName, Long incrementValue); long currentValue(String counterName); Collection<String> counterNames(); }
NamedCounters implements Serializable { public long currentValue(String counterName) { if (!counters.containsKey(counterName)) { throw new IllegalArgumentException("Couldn't find counter with name: " + counterName); } return counters.get(counterName); } NamedCounters();  NamedCounters(String[] initialCounterNames); <E extends Enum<E>> NamedCounters(Class<E> initialCounterNamesEnumClass); void increment(String counterName); void increment(String counterName, Long incrementValue); long currentValue(String counterName); Collection<String> counterNames();  }