Class ImmutableBiMap<K,​V>

  • Type Parameters:
    K - the key type
    V - 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
    • Method Detail

      • 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,​k extends K,​v extends 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,​k extends K,​v extends 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,​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 type
        V - the value type
        k -
        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 type
        V - the value type
        k -
        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 type
        V - the value type
        k -
        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 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,​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 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:
      • getByValue

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