Package com.google.common.collect
Class RegularImmutableBiMap.Inverse
- java.lang.Object
-
- com.google.common.collect.ImmutableMap<K,V>
-
- com.google.common.collect.ImmutableBiMapFauxverideShim<K,V>
-
- com.google.common.collect.ImmutableBiMap<V,K>
-
- com.google.common.collect.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>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
RegularImmutableBiMap.Inverse.InverseEntrySet
-
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 Modifier Constructor Description private
Inverse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ImmutableSet<java.util.Map.Entry<V,K>>
createEntrySet()
(package private) ImmutableSet<V>
createKeySet()
void
forEach(java.util.function.BiConsumer<? super V,? super K> action)
K
get(java.lang.Object value)
ImmutableBiMap<K,V>
inverse()
Returns the inverse view of this bimap, which maps each of this bimap's values to its associated key.(package private) boolean
isPartialView()
int
size()
(package private) java.lang.Object
writeReplace()
-
Methods inherited from class com.google.common.collect.ImmutableBiMap
builder, builderWithExpectedSize, copyOf, copyOf, createValues, forcePut, of, of, of, of, of, of, toImmutableBiMap, values
-
Methods inherited from class com.google.common.collect.ImmutableBiMapFauxverideShim
toImmutableMap, toImmutableMap
-
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
-
-
-
-
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 anotherImmutableBiMap
.
-
get
public K get(java.lang.Object value)
-
createKeySet
ImmutableSet<V> createKeySet()
- Specified by:
createKeySet
in classImmutableMap<V,K>
-
createEntrySet
ImmutableSet<java.util.Map.Entry<V,K>> createEntrySet()
- Specified by:
createEntrySet
in classImmutableMap<V,K>
-
isPartialView
boolean isPartialView()
- Specified by:
isPartialView
in classImmutableMap<V,K>
-
writeReplace
java.lang.Object writeReplace()
- Overrides:
writeReplace
in classImmutableBiMap<V,K>
-
-