T - the class of the elements of this multi-set.
Created: Sun Nov 23 22:36:30 2014public interface SortedMultiSet<T> extends MultiSet<T>
MultiSet.Multiplicity| Modifier and Type | Method and Description |
|---|---|
Comparator<? super T> |
comparator()
Returns the comparator used to order the elements in this set,
or
null
if this set uses the natural ordering of its elements. |
T |
first()
Returns the first (lowest) element currently in this set.
|
NavigableMap<T,MultiSet.Multiplicity> |
getMap()
Returns a view of the underlying map of this
MultiSet
as a map mapping each entry to its multiplicity. |
SortedSet<T> |
getSet()
Returns a view of the underlying sorted set
of this
SortedMultiSet. |
SortedMultiSet<T> |
headSet(T toElement)
Returns a view of the portion of this multi-set
whose elements are strictly less than
toElement. |
T |
last()
Returns the last (highest) element currently in this set.
|
SortedMultiSet<T> |
subSet(T fromElement,
T toElement)
Returns a view of the portion of this multi-set
whose elements range from
fromElement inclusively
to toElement exclusively. |
SortedMultiSet<T> |
tailSet(T fromElement)
Returns a view of the portion of this multi-set
whose elements are greater than or equal to
fromElement. |
add, addAll, addAll, addWithMult, addWithMult, clear, contains, containsAll, equals, getMaxMult, getMultiplicity, getMultiplicityObj, getObjWithMaxMult, getSetWithMults, hashCode, isEmpty, iterator, remove, removeAll, removeWithMult, removeWithMult, retainAll, setMultiplicity, size, sizeWithMult, toArray, toArray, toStringforEach, spliteratorSortedSet<T> getSet()
SortedMultiSet.
For certain implementations, this set is immutable
to prevent implicit modification of this SortedMultiSet.NavigableMap<T,MultiSet.Multiplicity> getMap()
MultiSet
as a map mapping each entry to its multiplicity.Comparator<? super T> comparator()
null
if this set uses the natural ordering of its elements.null
if this set uses the natural ordering of its elements.T first()
NoSuchElementException - if this set is empty.T last()
NoSuchElementException - if this set is empty.SortedMultiSet<T> headSet(T toElement)
toElement.
The returned multi-set is backed by this multi-set,
so changes in the returned set are reflected in this multi-set,
and vice-versa.
The returned multi-set supports all optional multi-set operations
that this multi-set supports.
The returned multi-set
will throw an IllegalArgumentException
on an attempt to insert an element outside its range.
toElement - high endpoint (exclusive) of the returned multi-set.toElement.ClassCastException - if toElement is not compatible
with this multi-set's comparator
(or, if the set has no comparator,
if toElement does not implement Comparable).
Implementations may, but are not required to,
throw this exception if toElement cannot be compared
to elements currently in this multi-set.NullPointerException - if toElement is null
and this multi-set does not permit null elements.IllegalArgumentException - if this multi-set itself has a restricted range,
and toElement lies outside the bounds of the range.SortedMultiSet<T> tailSet(T fromElement)
fromElement.
The returned multi-set is backed by this multi-set,
so changes in the returned set are reflected in this multi-set,
and vice-versa.
The returned multi-set supports all optional multi-set operations
that this multi-set supports.
The returned multi-set
will throw an IllegalArgumentException
on an attempt to insert an element outside its range.
fromElement - low endpoint (inclusive) of the returned multi-set.fromElement.ClassCastException - if fromElement is not compatible
with this multi-set's comparator
(or, if the set has no comparator,
if fromElement does not implement Comparable).
Implementations may, but are not required to,
throw this exception if fromElement cannot be compared
to elements currently in this multi-set.NullPointerException - if fromElement is null
and this multi-set does not permit null elements.IllegalArgumentException - if this multi-set itself has a restricted range,
and fromElement lies outside the bounds of the range.SortedMultiSet<T> subSet(T fromElement, T toElement)
fromElement inclusively
to toElement exclusively.
The returned multi-set is backed by this multi-set,
so changes in the returned set are reflected in this multi-set,
and vice-versa.
The returned multi-set supports all optional multi-set operations
that this multi-set supports.
The returned multi-set
will throw an IllegalArgumentException
on an attempt to insert an element outside its range.
fromElement - low endpoint (inclusive) of the returned multi-set.toElement - high endpoint (exclusive) of the returned multi-set.fromElement inclusively
to toElement exclusively.ClassCastException - **** maybe original documentation wrong. ****
if fromElement and toElement
cannot be compared to one another using this set's comparator
(or, if the set has no comparator, using natural ordering).
or if fromElement is not compatible
with this multi-set's comparator
(or, if the set has no comparator,
if fromElement does not implement Comparable).
Implementations may, but are not required to,
throw this exception
if fromElement or toElement
cannot be compared to elements currently in this multi-set.NullPointerException - if fromElement or toElement
is null
and this multi-set does not permit null elements.IllegalArgumentException - if fromElement is greater than toElement
or if this multi-set itself has a restricted range,
and fromElement or toElement
lies outside the bounds of the range.Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.