Class RegularImmutableBiMap.Inverse

java.lang.Object
com.google.common.collect.ImmutableMap<V,K>
com.google.common.collect.ImmutableBiMap<V,K>
com.google.common.collect.RegularImmutableBiMap.Inverse
All Implemented Interfaces:
BiMap<V,K>, Serializable, Map<V,K>
Enclosing class:
RegularImmutableBiMap<K,V>

private final class RegularImmutableBiMap.Inverse extends ImmutableBiMap<V,K>
  • Constructor Details

    • Inverse

      private Inverse()
  • Method Details

    • size

      public int size()
    • inverse

      public ImmutableBiMap<K,V> inverse()
      Description copied from class: ImmutableBiMap
      Returns the inverse view of this bimap, which maps each of this bimap's values to its associated key. The two bimaps are backed by the same data; any changes to one will appear in the other.

      Note:There is no guaranteed correspondence between the iteration order of a bimap and that of its inverse.

      The inverse of an ImmutableBiMap is another ImmutableBiMap.

      Specified by:
      inverse in interface BiMap<V,K>
      Specified by:
      inverse in class ImmutableBiMap<V,K>
      Returns:
      the inverse view of this bimap
    • forEach

      public void forEach(BiConsumer<? super V,? super K> action)
    • get

      @CheckForNull public K get(@CheckForNull Object value)
      Specified by:
      get in interface Map<V,K>
      Specified by:
      get in class ImmutableMap<V,K>
    • createKeySet

      ImmutableSet<V> createKeySet()
      Specified by:
      createKeySet in class ImmutableMap<V,K>
    • createEntrySet

      ImmutableSet<Map.Entry<V,K>> createEntrySet()
      Specified by:
      createEntrySet in class ImmutableMap<V,K>
    • isPartialView

      boolean isPartialView()
      Specified by:
      isPartialView in class ImmutableMap<V,K>
    • writeReplace

      Object writeReplace()
      Description copied from class: ImmutableMap
      Returns a serializable form of this object. Non-public subclasses should not override this method. Publicly-accessible subclasses must override this method and should return a subclass of SerializedForm whose readResolve() method returns objects of the subclass type.
      Overrides:
      writeReplace in class ImmutableBiMap<V,K>
    • readObject

      private void readObject(ObjectInputStream stream) throws InvalidObjectException
      Throws:
      InvalidObjectException