Package com.google.common.collect
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>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableBiMap
ImmutableBiMap.Builder<K,
V> Nested classes/interfaces inherited from class com.google.common.collect.ImmutableMap
ImmutableMap.IteratorBasedImmutableMap<K,
V> -
Field Summary
Fields inherited from class com.google.common.collect.ImmutableMap
EMPTY_ENTRY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ImmutableSet
<Map.Entry<V, K>> (package private) ImmutableSet
<V> void
forEach
(BiConsumer<? super V, ? super K> action) inverse()
Returns the inverse view of this bimap, which maps each of this bimap's values to its associated key.(package private) boolean
private void
readObject
(ObjectInputStream stream) int
size()
(package private) Object
Returns a serializable form of this object.Methods inherited from class com.google.common.collect.ImmutableBiMap
builder, builderWithExpectedSize, copyOf, copyOf, createValues, forcePut, of, of, of, of, of, of, of, of, of, of, of, ofEntries, toImmutableBiMap, toImmutableMap, toImmutableMap, values
Methods inherited from class com.google.common.collect.ImmutableMap
asMultimap, checkNoConflict, clear, compute, computeIfAbsent, computeIfPresent, conflictException, containsKey, containsValue, entryOf, entrySet, equals, getOrDefault, hashCode, isEmpty, isHashCodeFast, keyIterator, keySet, keySpliterator, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll
-
Constructor Details
-
Inverse
private Inverse()
-
-
Method Details
-
size
public int size() -
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 anotherImmutableBiMap
. -
forEach
-
get
-
createKeySet
ImmutableSet<V> createKeySet()- Specified by:
createKeySet
in classImmutableMap<V,
K>
-
createEntrySet
ImmutableSet<Map.Entry<V,K>> createEntrySet()- Specified by:
createEntrySet
in classImmutableMap<V,
K>
-
isPartialView
boolean isPartialView()- Specified by:
isPartialView
in classImmutableMap<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 classImmutableBiMap<V,
K>
-
readObject
- Throws:
InvalidObjectException
-