Uses of Class
com.google.common.collect.ImmutableSortedMap
Package
Description
Collection interfaces and implementations, and other utilities for collections.
-
Uses of ImmutableSortedMap in com.google.common.collect
Modifier and TypeMethodDescriptionImmutableSortedMap.Builder.build()
Returns a newly-created immutable sorted map.final ImmutableSortedMap
<K, V> ImmutableSortedMap.Builder.buildKeepingLast()
Deprecated.This method is not currently implemented, and may never be.ImmutableSortedMap.Builder.buildOrThrow()
Returns a newly-created immutable sorted map, or throws an exception if any two keys are equal.static <K,
V> ImmutableSortedMap <K, V> Returns an immutable map containing the given entries, with keys sorted by their natural ordering.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.copyOf
(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries, Comparator<? super K> comparator) Returns an immutable map containing the given entries, with keys sorted by the provided comparator.static <K,
V> ImmutableSortedMap <K, V> Returns an immutable map containing the same entries asmap
, sorted by the natural ordering of the keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.copyOf
(Map<? extends K, ? extends V> map, Comparator<? super K> comparator) Returns an immutable map containing the same entries asmap
, with keys sorted by the provided comparator.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.copyOfSorted
(SortedMap<K, ? extends V> map) Returns an immutable map containing the same entries as the provided sorted map, with the same ordering.ImmutableSortedMap.descendingMap()
This method returns aImmutableSortedMap
, consisting of the entries whose keys are less thantoKey
.This method returns aImmutableSortedMap
, consisting of the entries whose keys are less than (or equal to, ifinclusive
)toKey
.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of()
Returns the empty sorted map.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1) Returns an immutable map containing a single entry.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1) Deprecated.Pass a key of typeComparable
to useof(Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys.static <K,
V> ImmutableSortedMap <K, V> ImmutableSortedMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) Deprecated.Pass keys of typeComparable
to useof(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object)
.static <K,
V> ImmutableSortedMap <K, V> Deprecated.UseImmutableSortedMap.copyOf(ImmutableMap.ofEntries(...))
.This method returns aImmutableSortedMap
, consisting of the entries whose keys ranges fromfromKey
totoKey
, inclusive or exclusive as indicated by the boolean flags.This method returns aImmutableSortedMap
, consisting of the entries whose keys ranges fromfromKey
, inclusive, totoKey
, exclusive.This method returns aImmutableSortedMap
, consisting of the entries whose keys are greater than or equals tofromKey
.This method returns aImmutableSortedMap
, consisting of the entries whose keys are greater than (or equal to, ifinclusive
)fromKey
.Modifier and TypeMethodDescriptionstatic <T extends @Nullable Object,
K, V>
Collector<T, ?, ImmutableSortedMap<K, V>> ImmutableSortedMap.toImmutableSortedMap
(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) Returns aCollector
that accumulates elements into anImmutableSortedMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T extends @Nullable Object,
K, V>
Collector<T, ?, ImmutableSortedMap<K, V>> ImmutableSortedMap.toImmutableSortedMap
(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Returns aCollector
that accumulates elements into anImmutableSortedMap
whose keys and values are the result of applying the provided mapping functions to the input elements.