static <K, V> Map<K,V> of()
Returns an unmodifiable map containing zero mappings. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Returns:
- an empty
Map
-
Since:
- 9
static <K, V> Map<K,V> of( K k1, V v1)
Returns an unmodifiable map containing a single mapping. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the mapping's key
-
v1 - the mapping's value
-
Returns:
- a
Map containing the specified mapping
-
Throws:
-
NullPointerException - if the key or the value is null
-
Since:
- 9
static <K, V> Map<K,V> of( K k1, V v1, K k2, V v2)
Returns an unmodifiable map containing two mappings. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if the keys are duplicates
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
k5 - the fifth mapping's key
-
v5 - the fifth mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
k5 - the fifth mapping's key
-
v5 - the fifth mapping's value
-
k6 - the sixth mapping's key
-
v6 - the sixth mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
k5 - the fifth mapping's key
-
v5 - the fifth mapping's value
-
k6 - the sixth mapping's key
-
v6 - the sixth mapping's value
-
k7 - the seventh mapping's key
-
v7 - the seventh mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
k5 - the fifth mapping's key
-
v5 - the fifth mapping's value
-
k6 - the sixth mapping's key
-
v6 - the sixth mapping's value
-
k7 - the seventh mapping's key
-
v7 - the seventh mapping's value
-
k8 - the eighth mapping's key
-
v8 - the eighth mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
k5 - the fifth mapping's key
-
v5 - the fifth mapping's value
-
k6 - the sixth mapping's key
-
v6 - the sixth mapping's value
-
k7 - the seventh mapping's key
-
v7 - the seventh mapping's value
-
k8 - the eighth mapping's key
-
v8 - the eighth mapping's value
-
k9 - the ninth mapping's key
-
v9 - the ninth mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
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. See Unmodifiable Maps for details.
-
Type Parameters:
-
K - the Map 's key type
-
V - the Map 's value type
-
Parameters:
-
k1 - the first mapping's key
-
v1 - the first mapping's value
-
k2 - the second mapping's key
-
v2 - the second mapping's value
-
k3 - the third mapping's key
-
v3 - the third mapping's value
-
k4 - the fourth mapping's key
-
v4 - the fourth mapping's value
-
k5 - the fifth mapping's key
-
v5 - the fifth mapping's value
-
k6 - the sixth mapping's key
-
v6 - the sixth mapping's value
-
k7 - the seventh mapping's key
-
v7 - the seventh mapping's value
-
k8 - the eighth mapping's key
-
v8 - the eighth mapping's value
-
k9 - the ninth mapping's key
-
v9 - the ninth mapping's value
-
k10 - the tenth mapping's key
-
v10 - the tenth mapping's value
-
Returns:
- a
Map containing the specified mappings
-
Throws:
-
IllegalArgumentException - if there are any duplicate keys
-
NullPointerException - if any key or value is null
-
Since:
- 9
|
|