public class MultiSet<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<T,java.lang.Integer> |
map |
Constructor and Description |
---|
MultiSet() |
Modifier and Type | Method and Description |
---|---|
void |
add(T key) |
boolean |
contains(T key) |
int |
count(T key) |
boolean |
isEmpty() |
java.util.Collection<T> |
keySet() |
int |
max() |
boolean |
remove(T key)
Remove one of key from the set, if present.
|
int |
size() |
java.util.Collection<java.lang.Integer> |
values() |
private final java.util.Map<T,java.lang.Integer> map
public void add(T key)
public boolean remove(T key)
public int size()
public boolean contains(T key)
public int count(T key)
public java.util.Collection<T> keySet()
public java.util.Collection<java.lang.Integer> values()
public boolean isEmpty()
public int max()