Package org.elasticsearch.core
Class Map
java.lang.Object
org.elasticsearch.core.Map
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> Map<K, V> Returns an unmodifiableMap
containing the entries of the givenMap
.static <K,
V> Map.Entry<K, V> entry
(K k, V v) Returns an unmodifiable Map.Entry for the provided key and value.static <K,
V> Map<K, V> of()
Returns an unmodifiable map containing one mapping.static <K,
V> Map<K, V> of
(K k1, V v1) Returns an unmodifiable map containing one mapping.static <K,
V> Map<K, V> of
(K k1, V v1, K k2, V v2) Returns an unmodifiable map containing two mappings.static <K,
V> Map<K, V> of
(K k1, V v1, K k2, V v2, K k3, V v3) Returns an unmodifiable map containing three mappings.static <K,
V> Map<K, V> of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) Returns an unmodifiable map containing four mappings.static <K,
V> Map<K, V> of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) Returns an unmodifiable map containing five mappings.static <K,
V> Map<K, V> 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 unmodifiable map containing six mappings.static <K,
V> Map<K, V> 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 unmodifiable map containing seven mappings.static <K,
V> Map<K, V> 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 unmodifiable map containing eight mappings.static <K,
V> Map<K, V> 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 unmodifiable map containing nine mappings.static <K,
V> Map<K, V> 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 unmodifiable map containing ten mappings.static <K,
V> Map<K, V> Returns an unmodifiable map containing keys and values extracted from the given entries.
-
Constructor Details
-
Map
public Map()
-
-
Method Details
-
of
Returns an unmodifiable map containing one mapping. -
of
Returns an unmodifiable map containing one mapping. -
of
Returns an unmodifiable map containing two mappings. -
of
Returns an unmodifiable map containing three mappings. -
of
Returns an unmodifiable map containing four mappings. -
of
Returns an unmodifiable map containing five mappings. -
of
public static <K,V> Map<K,V> 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 unmodifiable map containing six mappings. -
of
public static <K,V> Map<K,V> 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 unmodifiable map containing seven mappings. -
of
public static <K,V> Map<K,V> 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 unmodifiable map containing eight mappings. -
of
public static <K,V> Map<K,V> 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 unmodifiable map containing nine mappings. -
of
public static <K,V> Map<K,V> 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 unmodifiable map containing ten mappings. -
ofEntries
Returns an unmodifiable map containing keys and values extracted from the given entries.- Type Parameters:
K
- theMap
's key typeV
- theMap
's value type- Parameters:
entries
-Map.Entry
s containing the keys and values from which the map is populated- Returns:
- a
Map
containing the specified mappings
-
entry
Returns an unmodifiable Map.Entry for the provided key and value. -
copyOf
Returns an unmodifiableMap
containing the entries of the givenMap
.- Type Parameters:
K
- theMap
's key typeV
- theMap
's value type- Parameters:
map
- aMap
from which entries are drawn, must be non-null- Returns:
- a
Map
containing the entries of the givenMap
-