Package com.landawn.abacus.util
Class ImmutableBiMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
com.landawn.abacus.util.ImmutableMap<K,V>
com.landawn.abacus.util.ImmutableBiMap<K,V>
- Type Parameters:
K
- the key typeV
- the value type
- Since:
- 1.1.4
- Author:
- Haiyang Li
-
Nested Class Summary
Nested classes/interfaces inherited from class com.landawn.abacus.util.ImmutableMap
ImmutableMap.Builder<K,
V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> ImmutableBiMap<K, V> static <K,
V> ImmutableMap<K, V> Deprecated.static <K,
V> ImmutableBiMap<K, V> empty()
getByValue
(Object value) Gets the by value.static <K,
V> ImmutableBiMap<K, V> of
(K k1, V v1) static <K,
V> ImmutableBiMap<K, V> of
(K k1, V v1, K k2, V v2) static <K,
V> ImmutableBiMap<K, V> of
(K k1, V v1, K k2, V v2, K k3, V v3) static <K,
V> ImmutableBiMap<K, V> of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) static <K,
V> ImmutableBiMap<K, V> of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) static <K,
V> ImmutableBiMap<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) static <K,
V> ImmutableBiMap<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) static <K,
V> ImmutableBiMap<K, V> Deprecated.the ImmutableBiMap may be modified through the specifiedmap
static <K,
V> ImmutableMap<K, V> Deprecated.throwsUnsupportedOperationException
Methods inherited from class com.landawn.abacus.util.ImmutableMap
builder, builder, clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from interface java.util.Map
forEach, replaceAll
-
Method Details
-
empty
- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
of
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-- Returns:
-
of
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-k2
-v2
-- Returns:
-
of
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-- Returns:
-
of
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-- Returns:
-
of
public static <K,V> ImmutableBiMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) - Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-- Returns:
-
of
public static <K,V> ImmutableBiMap<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) - Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-- Returns:
-
of
public static <K,V> ImmutableBiMap<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) - Type Parameters:
K
- the key typeV
- the value type- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-k7
-v7
-- Returns:
-
copyOf
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
copyOf
@Deprecated public static <K,V> ImmutableMap<K,V> copyOf(Map<? extends K, ? extends V> map) throws UnsupportedOperationExceptionDeprecated.throwsUnsupportedOperationException
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- Throws:
UnsupportedOperationException
-
wrap
Deprecated.the ImmutableBiMap may be modified through the specifiedmap
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- an
ImmutableBiMap
backed by the specifiedmap
-
wrap
@Deprecated public static <K,V> ImmutableMap<K,V> wrap(Map<? extends K, ? extends V> map) throws UnsupportedOperationExceptionDeprecated.throwsUnsupportedOperationException
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- Throws:
UnsupportedOperationException
-
getByValue
Gets the by value.- Parameters:
value
-- Returns:
-
UnsupportedOperationException