V
- the type of the objectspublic class CountMap<V>
extends java.lang.Object
Constructor | Description |
---|---|
CountMap() |
Default constructor
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(V v) |
Adds a single instance of the give object.
|
void |
add(V v,
java.lang.Integer c) |
Adds multiple instances of the give object.
|
void |
addAll(CountMap<V> other) |
Add the members of another count map
|
java.util.Set<java.util.Map.Entry<V,java.lang.Integer>> |
entrySet() |
Get the entry set for the map
|
java.lang.Integer |
get(V v) |
Get the count of the given object
|
java.util.Set<V> |
keySet() |
Get the set of keys (that is objects)
|
java.util.Collection<java.lang.Integer> |
values() |
Get the set of values (that is counts)
|
public void add(V v)
v
- The objectpublic void add(V v, java.lang.Integer c)
v
- The objectc
- The number of instances to addpublic void addAll(CountMap<V> other)
other
- The other count mappublic java.lang.Integer get(V v)
v
- The objectpublic java.util.Set<V> keySet()
public java.util.Collection<java.lang.Integer> values()
public java.util.Set<java.util.Map.Entry<V,java.lang.Integer>> entrySet()