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 ß).
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
clear()
boolean
boolean
int
int
countAll
(Collection<? extends A> a) int
countAllUnchecked
(Collection<?> a) int
domain()
domain().equals(supportMap().keySet())boolean
isEmpty()
boolean
boolean
removeAll
(Collection<? extends A> c) boolean
removeAllUnchecked
(Collection<?> c) boolean
removeDomain
(A a) boolean
boolean
boolean
retainAll
(Collection<? extends A> c) boolean
retainAllUnchecked
(Collection<?> c) ATTENTION assume no Map.Entry.getValue()==0 is in map, but domain key is removed in case that count == 0.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
ATTENTION assume no Map.Entry.getValue()==0 is in map, but domain key is removed in case that count == 0. -
count
-
countUnchecked
-
countAll
-
countAllUnchecked
-