public class CountingMap extends Object
Constructor and Description |
---|
CountingMap() |
Modifier and Type | Method and Description |
---|---|
int |
count(String key)
Returns the count of the given key
|
int |
decrement(String key)
Decrements the given key
|
void |
decrementAll(List<String> keys) |
int |
increment(String key)
Increments the given key
|
void |
incrementAll(Iterable<String> keys)
Increments the counter of all the given keys
|
Set<String> |
keySet()
Returns all the keys with a value of > 0
|
void |
setCount(String key,
int value)
Updates the counter value for the given key
|
String |
toString() |
int |
total()
Returns the total of all counters
|
public void incrementAll(Iterable<String> keys)
public int increment(String key)
public int decrement(String key)
public int count(String key)
public int total()
public void setCount(String key, int value)
Copyright © 2011–2016 Red Hat. All rights reserved.