Package eu.bandm.tools.ops
Interface Multiset<A>
- All Superinterfaces:
Iterable<A>,Serializable
- All Known Subinterfaces:
SortedMultiset<A>
- All Known Implementing Classes:
HashMultiset,TreeMultiset,UnmodifiableMultiset
Structure similar to a set, but every element can be contained more
than once.
Corresponds to a map from the domain type into natural numbers
(including 0).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidclear()booleanbooleanintintcountAll(Collection<? extends A> a) intcountAllUnchecked(Collection<?> a) intdomain()domain().equals(supportMap().keySet())booleanisEmpty()booleanbooleanremoveAll(Collection<? extends A> c) booleanremoveAllUnchecked(Collection<?> c) booleanremoveDomain(A a) booleanbooleanbooleanretainAll(Collection<? extends A> c) booleanretainAllUnchecked(Collection<?> c) The realizing peer.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
isEmpty
boolean isEmpty() -
clear
void clear() -
add
- Returns:
- whether the Multiset has been changed.
Is defined only for a better analogy to the philosophy of
java.util.Collection,
but indeed returns always
true.
-
add
-
contains
-
containsUnchecked
-
remove
-
removeUnchecked
-
removeDomain
-
removeDomainUnchecked
-
removeAll
-
removeAllUnchecked
-
retainAll
-
retainAllUnchecked
-
domain
domain().equals(supportMap().keySet()) -
supportMap
The realizing peer. ATTENTION assume no Map.Entry.getValue()==0 is in map, but domain key is removed in case that count == 0. -
count
-
countUnchecked
-
countAll
-
countAllUnchecked
-