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:
java.io.Serializable
,java.util.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
-
-
Field Summary
Fields Modifier and Type Field Description private int
size
-
Fields inherited from class com.google.common.collect.ImmutableMap
EMPTY_ENTRY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ImmutableArrayMap(int size)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) ImmutableSet<K>
createKeySet()
(package private) UnmodifiableIterator<java.util.Map.Entry<K,V>>
entryIterator()
V
get(java.lang.Object key)
(package private) K
getKey(int index)
(package private) abstract V
getValue(int keyIndex)
private boolean
isFull()
(package private) abstract ImmutableMap<K,java.lang.Integer>
keyToIndex()
int
size()
-
Methods inherited from class com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap
createEntrySet
-
Methods inherited from class com.google.common.collect.ImmutableMap
asMultimap, builder, checkNoConflict, clear, containsKey, containsValue, copyOf, copyOf, createValues, entryOf, entrySet, equals, hashCode, isEmpty, isHashCodeFast, isPartialView, keyIterator, keySet, of, of, of, of, of, of, put, putAll, remove, toString, values, writeReplace
-
-
-
-
Method Detail
-
keyToIndex
abstract ImmutableMap<K,java.lang.Integer> keyToIndex()
-
isFull
private boolean isFull()
-
getKey
K getKey(int index)
-
getValue
@Nullable abstract V getValue(int keyIndex)
-
createKeySet
ImmutableSet<K> createKeySet()
- Overrides:
createKeySet
in classImmutableMap<K,V>
-
size
public int size()
-
get
public V get(@Nullable java.lang.Object key)
-
entryIterator
UnmodifiableIterator<java.util.Map.Entry<K,V>> entryIterator()
- Specified by:
entryIterator
in classImmutableMap.IteratorBasedImmutableMap<K,V>
-
-