Class TreeMultiSet<T>
- java.lang.Object
-
- java.util.AbstractCollection<T>
-
- org.processmining.framework.util.collection.AbstractMultiSet<T,java.util.TreeMap<T,java.lang.Integer>>
-
- org.processmining.framework.util.collection.TreeMultiSet<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,MultiSet<T>
,SortedMultiSet<T>
,HTMLToString
public class TreeMultiSet<T> extends AbstractMultiSet<T,java.util.TreeMap<T,java.lang.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
Constructors Constructor Description 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.TreeMultiSet(java.util.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(java.util.Collection<T> collection, java.util.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(java.util.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(java.util.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.SortedSet<T>
baseSet()
returns an unmodifiable set of unique objects in the multiset.java.util.Comparator<? super T>
comparator()
-
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.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 Detail
-
TreeMultiSet
public TreeMultiSet(java.util.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. 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(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. 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
public TreeMultiSet(java.util.Collection<T> collection, java.util.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.- Parameters:
comp
- A comparator providing sorting on the elements of the multisetcollection
- Representing the objects that should be put in a multiset
-
TreeMultiSet
public TreeMultiSet(java.util.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.- Parameters:
comp
- A comparator providing sorting on the elements of the multisetcollection
- Representing the objects that should be put in a multiset
-
TreeMultiSet
public TreeMultiSet(java.util.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.- Parameters:
comp
- A comparator providing sorting on the elements of the multiset
-
-
Method Detail
-
comparator
public java.util.Comparator<? super T> comparator()
- Specified by:
comparator
in interfaceSortedMultiSet<T>
-
baseSet
public java.util.SortedSet<T> baseSet()
returns an unmodifiable set of unique objects in the multiset.- Specified by:
baseSet
in interfaceMultiSet<T>
- Specified by:
baseSet
in interfaceSortedMultiSet<T>
- Overrides:
baseSet
in classAbstractMultiSet<T,java.util.TreeMap<T,java.lang.Integer>>
- Returns:
- an unmodifiable set of unique objects in the multiset.
-
-