public class HashMultiset<A> extends Object implements Multiset<A>
Constructor and Description |
---|
HashMultiset() |
HashMultiset(Multiset<? extends A> proto) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(A a) |
boolean |
add(A a,
int i) |
void |
clear() |
boolean |
contains(A a)
Iff get(a)>0!
|
boolean |
containsUnchecked(Object a) |
int |
count(A o) |
int |
countAll(Collection<? extends A> c) |
int |
countAllUnchecked(Collection<?> c) |
int |
countUnchecked(Object o) |
Set<A> |
domain()
domain().equals(supportMap().keySet())
|
boolean |
isEmpty() |
Iterator<A> |
iterator() |
boolean |
remove(A a) |
boolean |
removeAll(Collection<? extends A> c) |
boolean |
removeAllUnchecked(Collection<?> c) |
boolean |
removeDomain(A a) |
boolean |
removeDomainUnchecked(Object a) |
boolean |
removeUnchecked(Object a) |
boolean |
retainAll(Collection<? extends A> c) |
boolean |
retainAllUnchecked(Collection<?> c) |
Map<A,Integer> |
supportMap()
ATTENTION assume no Map.Entry.getValue()==0 is in map, but domain key is
removed in case that count == 0.
|
String |
toString() |
protected int |
xget(Object a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Map<A,Integer> supportMap()
Multiset
supportMap
in interface Multiset<A>
public Set<A> domain()
Multiset
protected int xget(Object a)
public boolean add(A a)
public boolean add(A a, int i)
public boolean containsUnchecked(Object a)
containsUnchecked
in interface Multiset<A>
public boolean removeUnchecked(Object a)
removeUnchecked
in interface Multiset<A>
public boolean removeDomain(A a)
removeDomain
in interface Multiset<A>
public boolean removeDomainUnchecked(Object a)
removeDomainUnchecked
in interface Multiset<A>
public boolean removeAll(Collection<? extends A> c)
public boolean removeAllUnchecked(Collection<?> c)
removeAllUnchecked
in interface Multiset<A>
public boolean retainAll(Collection<? extends A> c)
public boolean retainAllUnchecked(Collection<?> c)
retainAllUnchecked
in interface Multiset<A>
public int countUnchecked(Object o)
countUnchecked
in interface Multiset<A>
public int countAll(Collection<? extends A> c)
public int countAllUnchecked(Collection<?> c)
countAllUnchecked
in interface Multiset<A>
see also the complete user documentation .