Package com.landawn.abacus.util
Class ImmutableBiMap<K,V>
- java.lang.Object
-
- com.landawn.abacus.util.ImmutableMap<K,V>
-
- com.landawn.abacus.util.ImmutableBiMap<K,V>
-
- Type Parameters:
K
- the key typeV
- the value type
- All Implemented Interfaces:
Map<K,V>
public final class ImmutableBiMap<K,V> extends ImmutableMap<K,V>
The Class ImmutableBiMap.- 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>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <K,V>
ImmutableBiMap<K,V>copyOf(BiMap<? extends K,? extends V> map)
static <K,V>
ImmutableMap<K,V>copyOf(Map<? extends K,? extends V> map)
Deprecated.throwsUnsupportedOperationException
static <K,V>
ImmutableBiMap<K,V>empty()
K
getByValue(Object value)
Gets the by value.static <K,V>
ImmutableBiMap<K,V>of(BiMap<? extends K,? extends V> map)
static <K,V>
ImmutableMap<K,V>of(Map<? extends K,? extends V> map)
Deprecated.throwsUnsupportedOperationException
static <K,V,k extends K,v extends V>
ImmutableBiMap<K,V>of(k k1, v v1)
static <K,V,k extends K,v extends V>
ImmutableBiMap<K,V>of(k k1, v v1, k k2, v v2)
static <K,V,k extends K,v extends V>
ImmutableBiMap<K,V>of(k k1, v v1, k k2, v v2, k k3, v v3)
static <K,V,k extends K,v extends V>
ImmutableBiMap<K,V>of(k k1, v v1, k k2, v v2, k k3, v v3, k k4, v v4)
static <K,V,k extends K,v extends 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,k extends K,v extends 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,k extends K,v extends 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)
-
Methods inherited from class com.landawn.abacus.util.ImmutableMap
builder, clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size, toString, values
-
Methods inherited from interface java.util.Map
forEach, replaceAll
-
-
-
-
Method Detail
-
empty
public static <K,V> ImmutableBiMap<K,V> empty()
- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
of
public static <K,V,k extends K,v extends V> ImmutableBiMap<K,V> of(k k1, v v1)
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-- Returns:
-
of
public static <K,V,k extends K,v extends V> ImmutableBiMap<K,V> of(k k1, v v1, k k2, v v2)
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-- Returns:
-
of
public static <K,V,k extends K,v extends V> ImmutableBiMap<K,V> of(k k1, v v1, k k2, v v2, k k3, v v3)
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-- Returns:
-
of
public static <K,V,k extends K,v extends V> ImmutableBiMap<K,V> of(k k1, v v1, k k2, v v2, k k3, v v3, k k4, v v4)
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-- Returns:
-
of
public static <K,V,k extends K,v extends 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 typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-- Returns:
-
of
public static <K,V,k extends K,v extends 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 typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-- Returns:
-
of
public static <K,V,k extends K,v extends 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 typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-k7
-v7
-- Returns:
-
of
public static <K,V> ImmutableBiMap<K,V> of(BiMap<? extends K,? extends V> map)
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
- the elements in thismap
are shared by the returned ImmutableBiMap.- Returns:
-
copyOf
public static <K,V> ImmutableBiMap<K,V> copyOf(BiMap<? extends K,? extends V> map)
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
-
of
@Deprecated public static <K,V> ImmutableMap<K,V> of(Map<? extends K,? extends V> map) throws UnsupportedOperationException
Deprecated.throwsUnsupportedOperationException
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- Throws:
UnsupportedOperationException
-
copyOf
@Deprecated public static <K,V> ImmutableMap<K,V> copyOf(Map<? extends K,? extends V> map) throws UnsupportedOperationException
Deprecated.throwsUnsupportedOperationException
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- Throws:
UnsupportedOperationException
-
-