Class TreeMultiSet<T>
java.lang.Object
java.util.AbstractCollection<T>
org.processmining.framework.util.collection.AbstractMultiSet<T,TreeMap<T,Integer>>
org.processmining.framework.util.collection.TreeMultiSet<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,MultiSet<T>
,SortedMultiSet<T>
,HTMLToString
public class TreeMultiSet<T>
extends AbstractMultiSet<T,TreeMap<T,Integer>>
implements SortedMultiSet<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.processmining.framework.util.HTMLToString
HTMLToString.HTMLCellRenderer
-
Field Summary
Fields inherited from class org.processmining.framework.util.collection.AbstractMultiSet
map, size
-
Constructor Summary
ConstructorDescriptionConstructs a new, empty multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.TreeMultiSet
(Collection<T> collection) Constructs a new multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.TreeMultiSet
(Collection<T> collection, Comparator<? super T> comp) Constructs a new multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.TreeMultiSet
(Comparator<? super T> comp) Constructs a new, empty multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.TreeMultiSet
(Comparator<? super T> comp, T... collection) Constructs a new multiset, such that all elements of the given collection are added as many times as they are in the given array.TreeMultiSet
(T... collection) Constructs a new multiset, such that all elements of the given collection are added as many times as they are in the given array. -
Method Summary
Modifier and TypeMethodDescriptionbaseSet()
returns an unmodifiable set of unique objects in the multiset.Comparator<? super T>
Methods inherited from class org.processmining.framework.util.collection.AbstractMultiSet
add, add, addAll, clear, contains, containsAll, containsAtLeast, equals, hashCode, isEmpty, isLessOrEqual, iterator, occurrences, remove, removeAll, removeAllMultiSet, retainAll, retainAll, size, toHTMLString, toList, toString
Methods inherited from class java.util.AbstractCollection
toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
Methods inherited from interface org.processmining.framework.util.HTMLToString
toHTMLString
Methods inherited from interface org.processmining.framework.util.collection.MultiSet
add, isLessOrEqual, occurrences, toList
-
Constructor Details
-
TreeMultiSet
Constructs a new multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection. All elements inserted into the multiset must implement the Comparable interface. Furthermore, all such elements must be mutually comparable: e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the set.- Parameters:
collection
- Representing the objects that should be put in a multiset
-
TreeMultiSet
Constructs a new multiset, such that all elements of the given collection are added as many times as they are in the given array. All elements inserted into the multiset must implement the Comparable interface. Furthermore, all such elements must be mutually comparable: e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the set.- Parameters:
collection
- Representing the objects that should be put in a multiset
-
TreeMultiSet
public TreeMultiSet()Constructs a new, empty multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection. All elements inserted into the multiset must implement the Comparable interface. Furthermore, all such elements must be mutually comparable: e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the set. -
TreeMultiSet
Constructs a new multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.- Parameters:
comp
- A comparator providing sorting on the elements of the multisetcollection
- Representing the objects that should be put in a multiset
-
TreeMultiSet
Constructs a new multiset, such that all elements of the given collection are added as many times as they are in the given array.- Parameters:
comp
- A comparator providing sorting on the elements of the multisetcollection
- Representing the objects that should be put in a multiset
-
TreeMultiSet
Constructs a new, empty multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.- Parameters:
comp
- A comparator providing sorting on the elements of the multiset
-
-
Method Details
-
comparator
- Specified by:
comparator
in interfaceSortedMultiSet<T>
-
baseSet
returns an unmodifiable set of unique objects in the multiset.
-