private final class RegularImmutableBiMap.Inverse extends ImmutableBiMap<V,K>
Modifier and Type | Class and Description |
---|---|
(package private) class |
RegularImmutableBiMap.Inverse.InverseEntrySet |
ImmutableBiMap.Builder<K,V>
ImmutableMap.IteratorBasedImmutableMap<K,V>
EMPTY_ENTRY_ARRAY
Modifier | Constructor and Description |
---|---|
private |
Inverse() |
Modifier and Type | Method and 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()
Returns a serializable form of this object.
|
builder, builderWithExpectedSize, copyOf, copyOf, createValues, forcePut, of, of, of, of, of, of, of, of, of, of, of, ofEntries, toImmutableBiMap, values
toImmutableMap, toImmutableMap
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
public int size()
public ImmutableBiMap<K,V> inverse()
ImmutableBiMap
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
.
@CheckForNull public K get(@CheckForNull java.lang.Object value)
ImmutableSet<V> createKeySet()
createKeySet
in class ImmutableMap<V,K>
ImmutableSet<java.util.Map.Entry<V,K>> createEntrySet()
createEntrySet
in class ImmutableMap<V,K>
boolean isPartialView()
isPartialView
in class ImmutableMap<V,K>
java.lang.Object writeReplace()
ImmutableMap
writeReplace
in class ImmutableBiMap<V,K>