Class RegularImmutableBiMap.Inverse

  • All Implemented Interfaces:
    BiMap<V,​K>, java.io.Serializable, java.util.Map<V,​K>
    Enclosing class:
    RegularImmutableBiMap<K,​V>

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

      • Inverse

        private Inverse()
    • Method Detail

      • 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​(java.util.function.BiConsumer<? super V,​? super K> action)
      • get

        public K get​(java.lang.Object value)
        Specified by:
        get in interface java.util.Map<V,​K>
        Specified by:
        get in class ImmutableMap<V,​K>