Package | Description |
---|---|
com.google.common.collect |
This package contains generic collection interfaces and implementations, and
other utilities for working with collections.
|
com.google.common.testing |
This package contains testing utilities.
|
Modifier and Type | Field and Description |
---|---|
private ImmutableSortedMap<K,V> |
ImmutableSortedMap.descendingMap |
private static ImmutableSortedMap<java.lang.Comparable,java.lang.Object> |
ImmutableSortedMap.NATURAL_EMPTY_MAP |
Modifier and Type | Method and Description |
---|---|
ImmutableSortedMap<K,V> |
ImmutableSortedMap.Builder.build()
Returns a newly-created immutable sorted map.
|
static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.copyOf(java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>> entries)
Returns an immutable map containing the given entries, with keys sorted
by the provided comparator.
|
static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.copyOf(java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>> entries,
java.util.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> |
ImmutableSortedMap.copyOf(java.util.Map<? extends K,? extends V> map)
Returns an immutable map containing the same entries as
map , sorted
by the natural ordering of the keys. |
static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.copyOf(java.util.Map<? extends K,? extends V> map,
java.util.Comparator<? super K> comparator)
Returns an immutable map containing the same entries as
map , with
keys sorted by the provided comparator. |
private static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.copyOfInternal(java.util.Map<? extends K,? extends V> map,
java.util.Comparator<? super K> comparator) |
static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.copyOfSorted(java.util.SortedMap<K,? extends V> map)
Returns an immutable map containing the same entries as the provided sorted
map, with the same ordering.
|
ImmutableSortedMap<K,V> |
ImmutableSortedMap.descendingMap() |
(package private) static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.emptyMap(java.util.Comparator<? super K> comparator) |
private static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.fromEntries(java.util.Comparator<? super K> comparator,
boolean sameComparator,
java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>> entries)
Accepts a collection of possibly-null entries.
|
private static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.fromEntries(java.util.Comparator<? super K> comparator,
boolean sameComparator,
java.util.Map.Entry<K,V>[] entryArray,
int size) |
private ImmutableSortedMap<K,V> |
ImmutableSortedMap.getSubMap(int fromIndex,
int toIndex) |
ImmutableSortedMap<K,V> |
ImmutableSortedMap.headMap(K toKey)
This method returns a
ImmutableSortedMap , consisting of the entries
whose keys are less than toKey . |
ImmutableSortedMap<K,V> |
ImmutableSortedMap.headMap(K toKey,
boolean inclusive)
This method returns a
ImmutableSortedMap , consisting of the entries
whose keys are less than (or equal to, if inclusive ) toKey . |
static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.of()
Returns the empty sorted map.
|
private static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMap.of(java.util.Comparator<? super K> comparator,
K k1,
V v1)
Returns an immutable map containing a single entry.
|
static <K extends java.lang.Comparable<? super K>,V> |
ImmutableSortedMap.of(K k1,
V v1)
Returns an immutable map containing a single entry.
|
static <K,V> ImmutableSortedMap<K,V> |
ImmutableSortedMapFauxverideShim.of(K k1,
V v1)
Deprecated.
Pass a key of type
Comparable to use of(Comparable, Object) . |
static <K extends java.lang.Comparable<? super 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> |
ImmutableSortedMapFauxverideShim.of(K k1,
V v1,
K k2,
V v2)
Deprecated.
Pass keys of type
Comparable to use of(Comparable, Object, Comparable, Object) . |
static <K extends java.lang.Comparable<? super 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> |
ImmutableSortedMapFauxverideShim.of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
Deprecated.
Pass keys of type
Comparable to use of(Comparable, Object, Comparable, Object,
Comparable, Object) . |
static <K extends java.lang.Comparable<? super 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> |
ImmutableSortedMapFauxverideShim.of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
Deprecated.
Pass keys of type
Comparable to use of(Comparable, Object, Comparable, Object,
Comparable, Object, Comparable, Object) . |
static <K extends java.lang.Comparable<? super 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> |
ImmutableSortedMapFauxverideShim.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 type
Comparable to use of(Comparable, Object, Comparable, Object,
Comparable, Object, Comparable, Object, Comparable, Object) . |
private static <K extends java.lang.Comparable<? super K>,V> |
ImmutableSortedMap.ofEntries(ImmutableMapEntry<K,V>... entries) |
ImmutableSortedMap<K,V> |
ImmutableSortedMap.subMap(K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive)
This method returns a
ImmutableSortedMap , consisting of the entries
whose keys ranges from fromKey to toKey , inclusive or
exclusive as indicated by the boolean flags. |
ImmutableSortedMap<K,V> |
ImmutableSortedMap.subMap(K fromKey,
K toKey)
This method returns a
ImmutableSortedMap , consisting of the entries
whose keys ranges from fromKey , inclusive, to toKey ,
exclusive. |
ImmutableSortedMap<K,V> |
ImmutableSortedMap.tailMap(K fromKey)
This method returns a
ImmutableSortedMap , consisting of the entries
whose keys are greater than or equals to fromKey . |
ImmutableSortedMap<K,V> |
ImmutableSortedMap.tailMap(K fromKey,
boolean inclusive)
This method returns a
ImmutableSortedMap , consisting of the entries
whose keys are greater than (or equal to, if inclusive )
fromKey . |
Constructor and Description |
---|
ImmutableSortedMap(RegularImmutableSortedSet<K> keySet,
ImmutableList<V> valueList,
ImmutableSortedMap<K,V> descendingMap) |
SerializedForm(ImmutableSortedMap<?,?> sortedMap) |
Modifier and Type | Method and Description |
---|---|
private static <K extends java.lang.Comparable<? super K>,V> |
FreshValueGenerator.generateImmutableSortedMap(K key,
V value) |