Class Object2NullableObjectHashMap<K,V>

java.lang.Object
org.agrona.collections.Object2ObjectHashMap<K,V>
org.agrona.collections.Object2NullableObjectHashMap<K,V>
Type Parameters:
K - the type of keys maintained by this map.
V - the type of mapped values.
All Implemented Interfaces:
Map<K,V>

public class Object2NullableObjectHashMap<K,V> extends Object2ObjectHashMap<K,V>
Variation of Object2ObjectHashMap that allows null values.
  • Constructor Details

    • Object2NullableObjectHashMap

      public Object2NullableObjectHashMap()
      Default constructor.
    • Object2NullableObjectHashMap

      public Object2NullableObjectHashMap(int initialCapacity, float loadFactor)
      Defaults to avoiding allocation.
      Parameters:
      initialCapacity - for the map to override Object2ObjectHashMap.MIN_CAPACITY
      loadFactor - for the map to override Hashing.DEFAULT_LOAD_FACTOR.
    • Object2NullableObjectHashMap

      public Object2NullableObjectHashMap(int initialCapacity, float loadFactor, boolean shouldAvoidAllocation)
      Create a new instance with specified parameters.
      Parameters:
      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.
    • Object2NullableObjectHashMap

      public Object2NullableObjectHashMap(Object2ObjectHashMap<K,V> mapToCopy)
      Copy construct a new map from an existing one.
      Parameters:
      mapToCopy - for construction.
  • Method Details