public class Object2ObjectHashMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
class |
Object2ObjectHashMap.EntryIterator |
class |
Object2ObjectHashMap.KeySet |
class |
Object2ObjectHashMap.ValueIterator |
class |
Object2ObjectHashMap.Values |
Constructor and Description |
---|
Object2ObjectHashMap() |
Object2ObjectHashMap(int initialCapacity,
float loadFactor) |
Object2ObjectHashMap(int initialCapacity,
float loadFactor,
boolean shouldAvoidAllocation) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
compact()
Compact the backing arrays by rehashing with a capacity just larger than current size
and giving consideration to the load factor.
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value)
Does the map contain the value.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.BiConsumer<? super K,? super V> consumer) |
V |
get(java.lang.Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Object2ObjectHashMap.KeySet |
keySet() |
float |
loadFactor()
Get the load factor applied for resize operations.
|
V |
put(java.lang.Object key,
java.lang.Object value)
Put a key value pair into the map.
|
void |
putAll(java.util.Map<? extends K,? extends V> map) |
V |
remove(java.lang.Object key) |
int |
resizeThreshold()
Get the actual threshold which when reached the map will resize.
|
int |
size() |
java.lang.String |
toString() |
Object2ObjectHashMap.Values |
values() |
public Object2ObjectHashMap()
public Object2ObjectHashMap(int initialCapacity, float loadFactor)
public Object2ObjectHashMap(int initialCapacity, float loadFactor, boolean shouldAvoidAllocation)
initialCapacity
- for the map to override MIN_CAPACITY
loadFactor
- for the map to override Hashing.DEFAULT_LOAD_FACTOR
.shouldAvoidAllocation
- should allocation be avoided by caching iterators and map entries.public float loadFactor()
public int resizeThreshold()
public V put(java.lang.Object key, java.lang.Object value)
public boolean containsValue(java.lang.Object value)
public void compact()
public boolean containsKey(java.lang.Object key)
public Object2ObjectHashMap.KeySet keySet()
public Object2ObjectHashMap.Values values()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.