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 type
V - the value type
All Implemented Interfaces:
Immutable, Map<K,V>

public final class ImmutableBiMap<K,V> extends ImmutableMap<K,V>
Since:
1.1.4
Author:
Haiyang Li
  • Method Details

    • empty

      public static <K, V> ImmutableBiMap<K,V> empty()
      Type Parameters:
      K - the key type
      V - the value type
      Returns:
    • of

      public static <K, V> ImmutableBiMap<K,V> of(K k1, V v1)
      Type Parameters:
      K - the key type
      V - the value type
      k -
      v -
      Parameters:
      k1 -
      v1 -
      Returns:
    • of

      public static <K, V> ImmutableBiMap<K,V> of(K k1, V v1, K k2, V v2)
      Type Parameters:
      K - the key type
      V - the value type
      k -
      v -
      Parameters:
      k1 -
      v1 -
      k2 -
      v2 -
      Returns:
    • of

      public static <K, V> ImmutableBiMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
      Type Parameters:
      K - the key type
      V - the value type
      k -
      v -
      Parameters:
      k1 -
      v1 -
      k2 -
      v2 -
      k3 -
      v3 -
      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)
      Type Parameters:
      K - the key type
      V - the value type
      k -
      v -
      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 type
      V - the value type
      k -
      v -
      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 type
      V - the value type
      k -
      v -
      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 type
      V - the value type
      k -
      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 type
      V - the value type
      Parameters:
      map - the elements in this map 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 type
      V - 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.
      throws UnsupportedOperationException
      Type Parameters:
      K - the key type
      V - 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.
      throws UnsupportedOperationException
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      map -
      Returns:
      Throws:
      UnsupportedOperationException
    • getByValue

      public K getByValue(Object value)
      Gets the by value.
      Parameters:
      value -
      Returns: