| Constructor and Description |
|---|
HashMultiSet()
|
HashMultiSet(MultiSet
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T key)
Put
key to the MultiSet once.
|
void |
add(T key, int howOften)
|
void |
addAll(Collection
Put all keys contained in
key into the MultiSet once.
|
void |
addAll(Collection
|
boolean |
contains(T key)
Test whether
key is present in this MultiSet.
|
Iterator |
iterator()
|
Set |
keySet()
Get the set of keys in this MultiSet.
|
int |
occurences(T key)
Get the number of times the element
key is present in this MultiSet.
|
void |
remove(T key)
Remove key from the MultiSet once.
|
void |
removeAll(Collection
|
void |
removeAllN(Collection
|
void |
removeAllOccurences(Collection
|
void |
removeN(T key, int n)
Remove key from the MultiSet once.
|
void |
removeOccurences(T key)
Remove all occurrences of
key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic boolean contains(T key)
MultiSet
key is present in this MultiSet.
public int occurences(T key)
MultiSet
key is present in this MultiSet.
occurences in interface
MultiSet<T>
key - the element queried.
key in this MultiSet.
public void add(T key, int howOften)
public void addAll(Collection<T> keys)
MultiSet
key into the MultiSet once.
public void addAll(Collection<T> keys, int howOften)
public void remove(T key)
MultiSet
public void removeAll(Collection<? extends T> c)
public void removeOccurences(T key)
MultiSet
key.
removeOccurences in interface
MultiSet<T>
key - the element to remove.
public void removeAllOccurences(Collection<? extends T> c)
public void removeN(T key, int n)
MultiSet
public void removeAllN(Collection<? extends T> c, int n)
public Set<T> keySet()
MultiSet