Package eu.bandm.tools.ops
Class TreeMultiset<A>
java.lang.Object
eu.bandm.tools.ops.TreeMultiset<A>
- All Implemented Interfaces:
Multiset<A>
,SortedMultiset<A>
,Serializable
,Iterable<A>
Implementation for sorted domains,
where
TreeMultiset
not applicable.- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
clear()
Comparator<? super A>
boolean
Iff get(a)>0!boolean
int
int
countAll
(Collection<? extends A> c) int
countAllUnchecked
(Collection<?> c) int
domain()
domain().equals(supportMap().keySet())boolean
isEmpty()
iterator()
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.toString()
protected int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
map
-
-
Constructor Details
-
TreeMultiset
public TreeMultiset() -
TreeMultiset
-
-
Method Details
-
supportMap
Description copied from interface:Multiset
ATTENTION assume no Map.Entry.getValue()==0 is in map, but domain key is removed in case that count == 0.- Specified by:
supportMap
in interfaceMultiset<A>
- Specified by:
supportMap
in interfaceSortedMultiset<A>
-
domain
Description copied from interface:Multiset
domain().equals(supportMap().keySet()) -
comparator
- Specified by:
comparator
in interfaceSortedMultiset<A>
-
isEmpty
public boolean isEmpty() -
clear
public void clear() -
xget
-
add
-
add
-
contains
Iff get(a)>0! -
containsUnchecked
- Specified by:
containsUnchecked
in interfaceMultiset<A>
-
remove
-
removeUnchecked
- Specified by:
removeUnchecked
in interfaceMultiset<A>
-
removeDomain
- Specified by:
removeDomain
in interfaceMultiset<A>
-
removeDomainUnchecked
- Specified by:
removeDomainUnchecked
in interfaceMultiset<A>
-
removeAll
-
removeAllUnchecked
- Specified by:
removeAllUnchecked
in interfaceMultiset<A>
-
retainAll
-
retainAllUnchecked
- Specified by:
retainAllUnchecked
in interfaceMultiset<A>
-
count
-
countUnchecked
- Specified by:
countUnchecked
in interfaceMultiset<A>
-
countAll
-
countAllUnchecked
- Specified by:
countAllUnchecked
in interfaceMultiset<A>
-
iterator
-
toString
-