public class ImmutableMaps
Modifier and Type | Method and Description |
---|---|
static <K,V> ImmutableMap<K,V> |
immutableHashMapOf()
Returns an empty shared map. The returned map is serializable.
|
static <K,V> ImmutableMap<K,V> |
immutableHashMapOf(kotlin.Pair<? extends K,? extends V> pair)
Returns a singleton map. The returned map is serializable.
|
static <K,V> ImmutableMap<K,V> |
immutableHashMapOf(kotlin.Pair pairs)
Returns a hash map with the specified contents, given as a list of pairs where the first component is the key and the second is the value. The returned map is serializable.
|
static <K,V> ImmutableMap<K,V> |
immutableMapOf()
Returns an empty shared map. The returned map is serializable.
|
static <K,V> ImmutableMap<K,V> |
immutableMapOf(kotlin.Pair<? extends K,? extends V> pair)
Returns a singleton map. The returned map is serializable.
|
static <K,V> ImmutableMap<K,V> |
immutableMapOf(kotlin.Pair pairs)
Returns a map with the specified contents, given as a list of pairs where the first value is the key and the second is the value. If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.
|
static <K extends Comparable<? super K>,V> |
immutableNavigableMapOf(kotlin.Pair pairs)
Returns a navigable map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
|
static <K extends Comparable<? super K>,V> |
immutableNavigableMapOf(java.util.Comparator<? super K> comparator,
kotlin.Pair pairs)
Returns a navigable map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
|
static <K extends Comparable<? super K>,V> |
immutableSortedMapOf(kotlin.Pair pairs)
Returns a sorted map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
|
static <K,V> ImmutableSortedMap<K,V> |
immutableSortedMapOf(java.util.Comparator<? super K> comparator,
kotlin.Pair pairs)
Returns a sorted map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
|
static <K,V> ImmutableMap<K,V> |
toImmutableHashMap(java.util.Map<K,? extends V> $receiver)
Returns an immutable hash map containing all key-value pairs from the original map.
|
static <K,V> ImmutableMap<K,V> |
toImmutableHashMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable hash map containing all key-value pairs from the original source.
|
static <K,V> ImmutableMap<K,V> |
toImmutableHashMap(kotlin.Pair[] $receiver)
Returns an immutable hash map containing all key-value pairs from the original source.
|
static <K,V> ImmutableMap<K,V> |
toImmutableHashMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable hash map containing all key-value pairs from the original sequence.
|
static <K,V> ImmutableMap<K,V> |
toImmutableMap(java.util.Map<K,? extends V> $receiver)
Returns an immutable map containing all key-value pairs from the original map.
|
static <K,V> ImmutableMap<K,V> |
toImmutableMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable map containing all key-value pairs from the original source.
|
static <K,V> ImmutableMap<K,V> |
toImmutableMap(kotlin.Pair[] $receiver)
Returns an immutable map containing all key-value pairs from the original source.
|
static <K,V> ImmutableMap<K,V> |
toImmutableMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable map containing all key-value pairs from the original sequence.
|
static <K,V> ImmutableNavigableMap<K,V> |
toImmutableNavigableMap(java.util.NavigableMap<K,V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
|
static <K,V> ImmutableNavigableMap<K,V> |
toImmutableNavigableMap(java.util.SortedMap<K,V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
|
static <K,V> ImmutableNavigableMap<K,V> |
toImmutableNavigableMap(java.util.Map<K,? extends V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
|
static <K,V> ImmutableNavigableMap<K,V> |
toImmutableNavigableMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
|
static <K,V> ImmutableNavigableMap<K,V> |
toImmutableNavigableMap(kotlin.Pair[] $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
|
static <K,V> ImmutableNavigableMap<K,V> |
toImmutableNavigableMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
|
static <K,V> ImmutableSortedMap<K,V> |
toImmutableSortedMap(java.util.SortedMap<K,V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
|
static <K,V> ImmutableSortedMap<K,V> |
toImmutableSortedMap(java.util.Map<K,? extends V> $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original map.
|
static <K,V> ImmutableMap<K,V> |
toImmutableSortedMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
|
static <K,V> ImmutableMap<K,V> |
toImmutableSortedMap(kotlin.Pair[] $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
|
static <K,V> ImmutableMap<K,V> |
toImmutableSortedMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver,
java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
|
public static <K,V> ImmutableMap<K,V> immutableMapOf()
Returns an empty shared map. The returned map is serializable.
public static <K,V> ImmutableMap<K,V> immutableMapOf(kotlin.Pair<? extends K,? extends V> pair)
Returns a singleton map. The returned map is serializable.
public static <K,V> ImmutableMap<K,V> immutableMapOf(kotlin.Pair pairs)
Returns a map with the specified contents, given as a list of pairs where the first value is the key and the second is the value. If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.
Entries of the map are iterated in the order they were specified. The returned map is serializable
public static <K,V> ImmutableMap<K,V> immutableHashMapOf()
Returns an empty shared map. The returned map is serializable.
public static <K,V> ImmutableMap<K,V> immutableHashMapOf(kotlin.Pair<? extends K,? extends V> pair)
Returns a singleton map. The returned map is serializable.
public static <K,V> ImmutableMap<K,V> immutableHashMapOf(kotlin.Pair pairs)
Returns a hash map with the specified contents, given as a list of pairs where the first component is the key and the second is the value. The returned map is serializable.
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> immutableSortedMapOf(kotlin.Pair pairs)
Returns a sorted map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
The returned map is serializable
public static <K,V> ImmutableSortedMap<K,V> immutableSortedMapOf(java.util.Comparator<? super K> comparator, kotlin.Pair pairs)
Returns a sorted map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
The elements are sorted by the given comparator
The returned map is serializable
public static <K extends Comparable<? super K>,V> ImmutableNavigableMap<K,V> immutableNavigableMapOf(kotlin.Pair pairs)
Returns a navigable map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
The returned map is serializable
public static <K extends Comparable<? super K>,V> ImmutableNavigableMap<K,V> immutableNavigableMapOf(java.util.Comparator<? super K> comparator, kotlin.Pair pairs)
Returns a navigable map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.
The elements are sorted by the given comparator
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableMap(java.util.Map<K,? extends V> $receiver)
Returns an immutable map containing all key-value pairs from the original map.
The returned map preserves the entry iteration order of the original map.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable map containing all key-value pairs from the original source.
The returned map preserves the entry iteration order.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableMap(kotlin.Pair[] $receiver)
Returns an immutable map containing all key-value pairs from the original source.
The returned map preserves the entry iteration order.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable map containing all key-value pairs from the original sequence.
The returned map preserves the entry sequence order.
The returned map is serializable
This operation is terminal
public static <K,V> ImmutableMap<K,V> toImmutableHashMap(java.util.Map<K,? extends V> $receiver)
Returns an immutable hash map containing all key-value pairs from the original map.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableHashMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable hash map containing all key-value pairs from the original source.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableHashMap(kotlin.Pair[] $receiver)
Returns an immutable hash map containing all key-value pairs from the original source.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableHashMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver)
Returns an immutable hash map containing all key-value pairs from the original sequence.
The returned map is serializable
public static <K,V> ImmutableSortedMap<K,V> toImmutableSortedMap(java.util.SortedMap<K,V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
The returned map will have the same comparator as the original map.
The returned map is serializable
public static <K,V> ImmutableSortedMap<K,V> toImmutableSortedMap(java.util.Map<K,? extends V> $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original map.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableSortedMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableSortedMap(kotlin.Pair[] $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable
public static <K,V> ImmutableMap<K,V> toImmutableSortedMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable
public static <K,V> ImmutableNavigableMap<K,V> toImmutableNavigableMap(java.util.NavigableMap<K,V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
The returned map will have the same comparator as the original map.
The returned map is serializable
public static <K,V> ImmutableNavigableMap<K,V> toImmutableNavigableMap(java.util.SortedMap<K,V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
The returned map will have the same comparator as the original map.
The returned map is serializable
public static <K,V> ImmutableNavigableMap<K,V> toImmutableNavigableMap(java.util.Map<K,? extends V> $receiver)
Returns an immutable sorted map containing all key-value pairs from the original map.
The returned map will be sorted by the natural ordering of the elements
The returned map is serializable
public static <K,V> ImmutableNavigableMap<K,V> toImmutableNavigableMap(java.lang.Iterable<? extends kotlin.Pair<? extends K,? extends V>> $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable
public static <K,V> ImmutableNavigableMap<K,V> toImmutableNavigableMap(kotlin.Pair[] $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable
public static <K,V> ImmutableNavigableMap<K,V> toImmutableNavigableMap(kotlin.sequences.Sequence<? extends kotlin.Pair<? extends K,? extends V>> $receiver, java.util.Comparator<? super K> comparator)
Returns an immutable sorted map containing all key-value pairs from the original source.
The returned map will be sorted by the given comparator. The natural ordering will be use if the given comparator is null.
The returned map is serializable