SortedMultiset whose contents will never change, with many other important properties
detailed at ImmutableCollection.Warning
as with any sorted collection, you are strongly advised not to use a Comparator or Comparable type whose comparison behavior is inconsistent with
equals. That is, a.compareTo(b) or comparator.compare(a, b) should equal zero
if and only if a.equals(b). If this advice is not followed, the resulting
collection will not correctly obey its specification.
See the Guava User Guide article on immutable collections.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ImmutableSortedMultiset.
A builder for creating immutable multiset instances, especially |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv transient ImmutableSortedMultiset | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static <E> ImmutableSortedMultiset. | builder()
Hides com.
Deprecated
Use
Not supported.
ImmutableSortedMultiset#naturalOrder, which offers better type-safety.
|
| public final Comparator | comparator()
Implements com. Ordering#natural() if the natural
ordering of the elements is used.
|
| public static <E extends Comparable | copyOf(E[] elements)
Returns an immutable sorted multiset containing the given elements sorted by their natural
ordering.
|
| public static <E> ImmutableSortedMultiset | |
| public static <E> ImmutableSortedMultiset | |
| public static <E> ImmutableSortedMultiset | copyOf(Comparator<? super E> comparator, Iterator<? extends E> elements)
Returns an immutable sorted multiset containing the given elements sorted by the given |
| public static <E> ImmutableSortedMultiset | copyOf(Comparator<? super E> comparator, Iterable<? extends E> elements)
Returns an immutable sorted multiset containing the given elements sorted by the given |
| public static <Z> ImmutableSortedMultiset | copyOf(Z[] elements)
Hides com.
Deprecated
Pass parameters of type
Not supported.
Comparable to use ImmutableSortedMultiset#copyOf(Comparable[]).
|
| public static <E> ImmutableSortedMultiset | copyOfSorted(SortedMultiset<E> sortedMultiset)
Returns an immutable sorted multiset containing the elements of a sorted multiset, sorted by
the same |
| private static <E> ImmutableSortedMultiset | |
| public ImmutableSortedMultiset | descendingMultiset()
Implements com. |
| public abstract ImmutableSortedSet | elementSet()
Redeclares com. Implements abstract com. NavigableSet view of the distinct elements in this multiset.
|
| pack-priv static <E> ImmutableSortedMultiset | |
| public abstract ImmutableSortedMultiset | headMultiset(E upperBound, BoundType boundType)
Redeclares com. upperBound,
optionally including upperBound itself.
|
| public static <E extends Comparable | naturalOrder()
Returns a builder that creates immutable sorted multisets whose elements are ordered by their natural ordering. |
| public static <E> ImmutableSortedMultiset | of()
Returns the empty immutable sorted multiset.
|
| public static <E extends Comparable | of(E element)
Returns an immutable sorted multiset containing a single element.
|
| public static <E extends Comparable | of(E e1, E e2)
Returns an immutable sorted multiset containing the given elements sorted by their natural
ordering.
|
| public static <E extends Comparable | of(E e1, E e2, E e3)
Returns an immutable sorted multiset containing the given elements sorted by their natural
ordering.
|
| public static <E extends Comparable | of(E e1, E e2, E e3, E e4)
Returns an immutable sorted multiset containing the given elements sorted by their natural
ordering.
|
| public static <E extends Comparable | of(E e1, E e2, E e3, E e4, E e5)
Returns an immutable sorted multiset containing the given elements sorted by their natural
ordering.
|
| public static <E extends Comparable | of(E e1, E e2, E e3, E e4, E e5, E e6, E... remaining)
Returns an immutable sorted multiset containing the given elements sorted by their natural
ordering.
|
| public static <E> ImmutableSortedMultiset | of(E element)
Hides com.
Deprecated
Pass a parameter of type
Not supported.
Comparable to use ImmutableSortedMultiset#of(Comparable).
|
| public static <E> ImmutableSortedMultiset | of(E e1, E e2)
Hides com.
Deprecated
Pass the parameters of type
Not supported.
Comparable to use ImmutableSortedMultiset#of(Comparable, Comparable).
|
| public static <E> ImmutableSortedMultiset | of(E e1, E e2, E e3)
Hides com.
Deprecated
Pass the parameters of type
Not supported.
Comparable to use ImmutableSortedMultiset#of(Comparable, Comparable, Comparable).
|
| public static <E> ImmutableSortedMultiset | of(E e1, E e2, E e3, E e4)
Hides com.
Deprecated
Pass the parameters of type
Not supported.
Comparable to use ImmutableSortedMultiset#of(Comparable, Comparable, Comparable, Comparable).
|
| public static <E> ImmutableSortedMultiset | of(E e1, E e2, E e3, E e4, E e5)
Hides com.
Deprecated
Pass the parameters of type
Not supported.
Comparable to use ImmutableSortedMultiset#of(Comparable, Comparable, Comparable, Comparable, Comparable) .
|
| public static <E> ImmutableSortedMultiset | of(E e1, E e2, E e3, E e4, E e5, E e6, E... remaining)
Hides com.
Deprecated
Pass the parameters of type
Not supported.
Comparable to use ImmutableSortedMultiset#of(Comparable, Comparable, Comparable, Comparable, Comparable,
Comparable, Comparable. .
|
| public static <E> ImmutableSortedMultiset. | orderedBy(Comparator<E> comparator)
Returns a builder that creates immutable sorted multisets with an explicit comparator. |
| public final Multiset. | pollFirstEntry()
Implements com.
Deprecated
Unsupported operation.
Returns and removes the entry associated with the lowest element in this multiset, or returns
null if this multiset is empty.
|
| public final Multiset. | pollLastEntry()
Implements com.
Deprecated
Unsupported operation.
Returns and removes the entry associated with the greatest element in this multiset, or returns
null if this multiset is empty.
|
| private void | |
| public static <E extends Comparable | reverseOrder()
Returns a builder that creates immutable sorted multisets whose elements are ordered by the reverse of their natural ordering. |
| public ImmutableSortedMultiset | subMultiset(E lowerBound, BoundType lowerBoundType, E upperBound, BoundType upperBoundType)
Implements com. lowerBound and upperBound.
|
| public abstract ImmutableSortedMultiset | tailMultiset(E lowerBound, BoundType boundType)
Redeclares com. lowerBound,
optionally including lowerBound itself.
|
| public static <E> Collector | toImmutableMultiset()
Hides com.
Deprecated
Use
Not supported.
ImmutableSortedMultiset#toImmutableSortedMultiset.
|
| public static <T extends @Nullable Object, E> Collector | toImmutableMultiset(Function<? super T, ? extends E> elementFunction, ToIntFunction<? super T> countFunction)
Hides com.
Deprecated
Use
Not supported.
ImmutableSortedMultiset#toImmutableSortedMultiset.
|
| public static <E> Collector | toImmutableSortedMultiset(Comparator<? super E> comparator)
Returns a |
| public static <T extends @Nullable Object, E> Collector | toImmutableSortedMultiset(Comparator<? super E> comparator, Function<? super T, ? extends E> elementFunction, ToIntFunction<? super T> countFunction)
Returns a |
| pack-priv Object |