public class TreeMultiSet<T> extends AbstractMultiSet<T,java.util.TreeMap<T,java.lang.Integer>> implements SortedMultiSet<T>
HTMLToString.HTMLCellRenderer
map, size
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
java.util.SortedSet<T> |
baseSet()
returns an unmodifiable set of unique objects in the multiset.
|
java.util.Comparator<? super T> |
comparator() |
add, add, addAll, clear, contains, containsAll, containsAtLeast, equals, hashCode, isEmpty, isLessOrEqual, iterator, occurrences, remove, removeAll, removeAllMultiSet, retainAll, retainAll, size, toHTMLString, toList, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, isLessOrEqual, occurrences, toList
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
toHTMLString
public TreeMultiSet(java.util.Collection<T> collection)
collection
- Representing the objects that should be put in a multisetpublic TreeMultiSet(T... collection)
collection
- Representing the objects that should be put in a multisetpublic TreeMultiSet()
public TreeMultiSet(java.util.Collection<T> collection, java.util.Comparator<? super T> comp)
comp
- A comparator providing sorting on the elements of the multisetcollection
- Representing the objects that should be put in a multisetpublic TreeMultiSet(java.util.Comparator<? super T> comp, T... collection)
comp
- A comparator providing sorting on the elements of the multisetcollection
- Representing the objects that should be put in a multisetpublic TreeMultiSet(java.util.Comparator<? super T> comp)
comp
- A comparator providing sorting on the elements of the multisetpublic java.util.Comparator<? super T> comparator()
comparator
in interface SortedMultiSet<T>
public java.util.SortedSet<T> baseSet()
baseSet
in interface MultiSet<T>
baseSet
in interface SortedMultiSet<T>
baseSet
in class AbstractMultiSet<T,java.util.TreeMap<T,java.lang.Integer>>