public class Object2NullableObjectHashMap<K,V> extends Object2ObjectHashMap<K,V>
Object2ObjectHashMap
that allows null
values.Object2ObjectHashMap.EntryIterator, Object2ObjectHashMap.EntrySet, Object2ObjectHashMap.KeyIterator, Object2ObjectHashMap.KeySet, Object2ObjectHashMap.ValueCollection, Object2ObjectHashMap.ValueIterator
Constructor and Description |
---|
Object2NullableObjectHashMap()
Default constructor.
|
Object2NullableObjectHashMap(int initialCapacity,
float loadFactor)
Defaults to avoiding allocation.
|
Object2NullableObjectHashMap(int initialCapacity,
float loadFactor,
boolean shouldAvoidAllocation) |
Modifier and Type | Method and Description |
---|---|
protected Object |
mapNullValue(Object value)
Handle incoming null value and optionally replace with another non-null counterpart.
|
protected V |
unmapNullValue(Object value)
Handle incoming non-null value and optionally replace it with the null value counterpart.
|
capacity, clear, compact, containsKey, containsValue, entrySet, equals, forEach, get, hashCode, isEmpty, keySet, loadFactor, put, putAll, remove, resizeThreshold, size, toString, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public Object2NullableObjectHashMap()
public Object2NullableObjectHashMap(int initialCapacity, float loadFactor)
initialCapacity
- for the map to override Object2ObjectHashMap.MIN_CAPACITY
loadFactor
- for the map to override Hashing.DEFAULT_LOAD_FACTOR
.public Object2NullableObjectHashMap(int initialCapacity, float loadFactor, boolean shouldAvoidAllocation)
initialCapacity
- for the map to override Object2ObjectHashMap.MIN_CAPACITY
loadFactor
- for the map to override Hashing.DEFAULT_LOAD_FACTOR
.shouldAvoidAllocation
- should allocation be avoided by caching iterators and map entries.protected Object mapNullValue(Object value)
Object2ObjectHashMap
mapNullValue
in class Object2ObjectHashMap<K,V>
value
- value to be handled.protected V unmapNullValue(Object value)
Object2ObjectHashMap
Object2ObjectHashMap.mapNullValue(Object)
method.unmapNullValue
in class Object2ObjectHashMap<K,V>
value
- value to be handled.Object2ObjectHashMap.mapNullValue(Object)
Copyright © 2014-2021 Real Logic Limited. All Rights Reserved.