E - Elementpublic class Multiset<E>
extends java.lang.Object
| Constructor and Description |
|---|
Multiset()
Multiset constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(E e)
Add an appearance of the element in the multiset
|
void |
clear()
Clear the multiset
|
boolean |
contains(E e)
Return true if the multiset contains the element
|
java.lang.Long |
count(E e)
Return the number of appearances of e in the set
|
java.util.Set<java.util.Map.Entry<E,java.lang.Long>> |
entrySet()
Return a set view of the mappings of this multiset
|
java.lang.Long |
getTotalCount()
Return the total number of appearances of the elements in the mutiset
|
boolean |
isEmpty()
Return true if the multiset is empty
|
java.util.Set<E> |
keySet()
Return a set view of the keys of this multiset
|
void |
remove(E e)
Remove an appearance of the element in the multiset
|
java.lang.Long |
setCount(E e,
java.lang.Long count)
Return the previous count of the element e
|
int |
size()
Return the number of keys in the multiset
|
java.lang.String |
toString() |
public java.lang.Long count(E e)
e - Elementpublic java.lang.Long setCount(E e, java.lang.Long count)
e - Elementcount - New countpublic void add(E e)
e - Elementpublic void remove(E e)
e - Elementpublic boolean contains(E e)
e - Elementpublic boolean isEmpty()
public void clear()
public int size()
public java.lang.Long getTotalCount()
public java.util.Set<E> keySet()
public java.util.Set<java.util.Map.Entry<E,java.lang.Long>> entrySet()
public java.lang.String toString()
toString in class java.lang.Object