ImmutableMap with two or more entries.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final ImmutableMap | |
| pack-priv final transient Map. | |
| pack-priv static final double | HASH_FLOODING_FPP
Maximum allowed false positive probability of detecting a hash flooding attack given random input. |
| private final transient int | |
| pack-priv static final int | MAX_HASH_BUCKET_LENGTH
Maximum allowed length of a hash table bucket before falling back to a j.u.HashMap based implementation. |
| pack-priv static final double | MAX_LOAD_FACTOR
Closed addressing tends to perform well even with high load factors. |
| private static final long | |
| private final transient @Nullable ImmutableMapEntry |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static <K, V> ImmutableMapEntry | checkNoConflictInKeyBucket(Object key, Object newValue, ImmutableMapEntry<K, V> keyBucketHead, boolean throwIfDuplicateKeys)
Checks if the given key already appears in the hash chain starting at |
| pack-priv ImmutableSet | |
| pack-priv ImmutableSet | |
| pack-priv ImmutableCollection | |
| public void | forEach(BiConsumer<? super K, ? super V>
The action to be performed for each entry action)Overrides default java. |
| pack-priv static <K, V> ImmutableMap | |
| pack-priv static <K, V> ImmutableMap | fromEntryArray(int n, @Nullable Map.
Creates an ImmutableMap from the first n entries in entryArray. |
| private static <K, V> ImmutableMap | fromEntryArrayCheckingBucketOverflow(int n, @Nullable Map.
|
| public V | get(Object
the key whose associated value is to be returned key)Implements abstract com. Implements java. null if this map contains no mapping for the key.
|
| pack-priv static <V> V | |
| pack-priv boolean | |
| pack-priv static <K, V> ImmutableMapEntry | makeImmutable(Map.
Makes an entry usable internally by a new ImmutableMap without rereading its contents. |
| pack-priv static <K, V> ImmutableMapEntry | |
| pack-priv static <K, V> Map. | Returns: an array ofnewN entries where no key appears more than once.the original array of entries including duplicates entries,the number of valid entries in n, int entriesthe expected number of entries once duplicates are removed newN, IdentityHashMap<Map.Constructs a new entry array where each duplicated key from the original appears only once, at its first position but with its final value. |
| public int | |
| pack-priv Object | writeReplace()
Overrides com. |
| EMPTY | back to summary |
|---|---|
pack-priv static final ImmutableMap<Object, Object> EMPTY
| |
| entries | back to summary |
|---|---|
| pack-priv final transient Map. | |
| HASH_FLOODING_FPP | back to summary |
|---|---|
| pack-priv static final double HASH_FLOODING_FPP Maximum allowed false positive probability of detecting a hash flooding attack given random input. | |
| mask | back to summary |
|---|---|
| private final transient int mask | |
| MAX_HASH_BUCKET_LENGTH | back to summary |
|---|---|
| pack-priv static final int MAX_HASH_BUCKET_LENGTH Maximum allowed length of a hash table bucket before falling back to a j.u.HashMap based implementation. Experimentally determined. | |
| MAX_LOAD_FACTOR | back to summary |
|---|---|
| pack-priv static final double MAX_LOAD_FACTOR Closed addressing tends to perform well even with high load factors. Being conservative here ensures that the table is still likely to be relatively sparse (hence it misses fast) while saving space. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| table | back to summary |
|---|---|
| private final transient @Nullable ImmutableMapEntry<K, V>[] table
| |
| RegularImmutableMap | back to summary |
|---|---|
| private RegularImmutableMap(Map. | |
| checkNoConflictInKeyBucket | back to summary |
|---|---|
| pack-priv static <K, V> ImmutableMapEntry Checks if the given key already appears in the hash chain starting at
| |
| createEntrySet | back to summary |
|---|---|
| pack-priv ImmutableSet Implements abstract com.
| |
| createKeySet | back to summary |
|---|---|
| pack-priv ImmutableSet Implements abstract com.
| |
| createValues | back to summary |
|---|---|
| pack-priv ImmutableCollection Implements abstract com.
| |
| forEach | back to summary |
|---|---|
| public void forEach(BiConsumer<? super K, ? super V> action) Overrides default java. Doc from java. Performs the given action for each entry in this map until all entries have been processed or the action throws an exception. Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.) Exceptions thrown by the action are relayed to the caller.
| |
| fromEntries | back to summary |
|---|---|
| pack-priv static <K, V> ImmutableMap | |
| fromEntryArray | back to summary |
|---|---|
| pack-priv static <K, V> ImmutableMap Creates an ImmutableMap from the first n entries in entryArray. This implementation may replace the entries in entryArray with its own entry objects (though they will have the same key/value contents), and may take ownership of entryArray. | |
| fromEntryArrayCheckingBucketOverflow | back to summary |
|---|---|
| private static <K, V> ImmutableMap | |
| get | back to summary |
|---|---|
| public V get(Object key) Implements abstract com. Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| get | back to summary |
|---|---|
pack-priv static <V> V get(Object key, @Nullable ImmutableMapEntry<?, V>[] keyTable, int mask)
| |
| isPartialView | back to summary |
|---|---|
| pack-priv boolean isPartialView() Implements abstract com.
| |
| makeImmutable | back to summary |
|---|---|
| pack-priv static <K, V> ImmutableMapEntry Makes an entry usable internally by a new ImmutableMap without rereading its contents. | |
| makeImmutable | back to summary |
|---|---|
| pack-priv static <K, V> ImmutableMapEntry Makes an entry usable internally by a new ImmutableMap. | |
| removeDuplicates | back to summary |
|---|---|
| pack-priv static <K, V> Map. Constructs a new entry array where each duplicated key from the original appears only once, at
its first position but with its final value. The
| |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() Overrides com. Doc from com. 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.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| BucketOverflowException | back to summary |
|---|---|
| pack-priv BucketOverflowException() | |
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final RegularImmutableMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | contains(Object
element whose presence in this set is to be tested object)Implements abstract com. Implements java. true if this set contains the specified element.
|
| pack-priv K | |
| pack-priv boolean | isPartialView()
Implements abstract com. true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods.
|
| public int | size()
Implements abstract java. Implements java. |
| pack-priv Object |
| map | back to summary |
|---|---|
| private final RegularImmutableMap<K, ?> map | |
| KeySet | back to summary |
|---|---|
| pack-priv KeySet(RegularImmutableMap<K, ?> map) | |
| contains | back to summary |
|---|---|
| public boolean contains(Object object) Implements abstract com. Implements java. Doc from java. Returns | |
| get | back to summary |
|---|---|
| pack-priv K get(int index) Implements abstract com.
| |
| isPartialView | back to summary |
|---|---|
| pack-priv boolean isPartialView() Implements abstract com. Doc from com. Returns
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() Overrides com.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ImmutableMap | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object |
| map | back to summary |
|---|---|
| pack-priv final ImmutableMap<K, ?> map | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID
| |
| SerializedForm | back to summary |
|---|---|
| pack-priv SerializedForm(ImmutableMap<K, ?> map) | |
| readResolve | back to summary |
|---|---|
| pack-priv Object readResolve() | |
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final RegularImmutableMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public V | get(int
index of the element to return index)Implements java. |
| pack-priv boolean | isPartialView()
Implements abstract com. true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods.
|
| public int | size()
Implements abstract java. Implements java. |
| pack-priv Object |
| map | back to summary |
|---|---|
| pack-priv final RegularImmutableMap<K, V> map | |
| Values | back to summary |
|---|---|
| pack-priv Values(RegularImmutableMap<K, V> map) | |
| get | back to summary |
|---|---|
| public V get(int index) Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| isPartialView | back to summary |
|---|---|
| pack-priv boolean isPartialView() Implements abstract com. Doc from com. Returns
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() Overrides com.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ImmutableMap | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object |
| map | back to summary |
|---|---|
| pack-priv final ImmutableMap<?, V> map | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID
| |
| SerializedForm | back to summary |
|---|---|
| pack-priv SerializedForm(ImmutableMap<?, V> map) | |
| readResolve | back to summary |
|---|---|
| pack-priv Object readResolve() | |