Package com.google.common.collect
Class DenseImmutableTable.ImmutableArrayMap<K,V>
java.lang.Object
com.google.common.collect.ImmutableMap<K,V>
com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap<K,V>
com.google.common.collect.DenseImmutableTable.ImmutableArrayMap<K,V>
- All Implemented Interfaces:
Serializable
,Map<K,
V>
- Direct Known Subclasses:
DenseImmutableTable.Column
,DenseImmutableTable.ColumnMap
,DenseImmutableTable.Row
,DenseImmutableTable.RowMap
- Enclosing class:
DenseImmutableTable<R,
C, V>
private abstract static class DenseImmutableTable.ImmutableArrayMap<K,V>
extends ImmutableMap.IteratorBasedImmutableMap<K,V>
An immutable map implementation backed by an indexed nullable array.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableMap
ImmutableMap.Builder<K,
V>, ImmutableMap.IteratorBasedImmutableMap<K, V>, ImmutableMap.SerializedForm<K, V> -
Field Summary
FieldsFields inherited from class com.google.common.collect.ImmutableMap
EMPTY_ENTRY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ImmutableSet
<K> (package private) UnmodifiableIterator
<Map.Entry<K, V>> (package private) K
getKey
(int index) (package private) abstract V
getValue
(int keyIndex) private boolean
isFull()
(package private) abstract ImmutableMap
<K, Integer> int
size()
(package private) Object
Returns a serializable form of this object.Methods inherited from class com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap
createEntrySet, createValues, entrySpliterator
Methods inherited from class com.google.common.collect.ImmutableMap
asMultimap, builder, builderWithExpectedSize, checkNoConflict, clear, compute, computeIfAbsent, computeIfPresent, conflictException, containsKey, containsValue, copyOf, copyOf, entryOf, entrySet, equals, getOrDefault, hashCode, isEmpty, isHashCodeFast, isPartialView, keyIterator, keySet, keySpliterator, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, toImmutableMap, toImmutableMap, toString, values
-
Field Details
-
size
private final int size
-
-
Constructor Details
-
ImmutableArrayMap
ImmutableArrayMap(int size)
-
-
Method Details
-
keyToIndex
-
isFull
private boolean isFull() -
getKey
-
getValue
-
createKeySet
ImmutableSet<K> createKeySet()- Overrides:
createKeySet
in classImmutableMap.IteratorBasedImmutableMap<K,
V>
-
size
public int size() -
get
-
entryIterator
UnmodifiableIterator<Map.Entry<K,V>> entryIterator()- Specified by:
entryIterator
in classImmutableMap.IteratorBasedImmutableMap<K,
V>
-
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 classImmutableMap.IteratorBasedImmutableMap<K,
V>
-