Class Long2NullableObjectHashMap<V>

  • Type Parameters:
    V - type of values stored in the Map
    All Implemented Interfaces:
    java.util.Map<java.lang.Long,​V>

    public class Long2NullableObjectHashMap<V>
    extends Long2ObjectHashMap<V>
    Variation of Long2ObjectHashMap that allows null values.
    • Constructor Detail

      • Long2NullableObjectHashMap

        public Long2NullableObjectHashMap()
        Constructs map with default settings.
      • Long2NullableObjectHashMap

        public Long2NullableObjectHashMap​(int initialCapacity,
                                          float loadFactor)
        Constructs map with given initial capacity and load factory and enables caching of iterators.
        Parameters:
        initialCapacity - for the backing array.
        loadFactor - limit for resizing on puts.
      • Long2NullableObjectHashMap

        public Long2NullableObjectHashMap​(int initialCapacity,
                                          float loadFactor,
                                          boolean shouldAvoidAllocation)
        Construct a new map allowing a configuration for initial capacity and load factor.
        Parameters:
        initialCapacity - for the backing array
        loadFactor - limit for resizing on puts
        shouldAvoidAllocation - should allocation be avoided by caching iterators and map entries.
      • Long2NullableObjectHashMap

        public Long2NullableObjectHashMap​(Long2ObjectHashMap<V> mapToCopy)
        Copy construct a new map from an existing one.
        Parameters:
        mapToCopy - for construction.
    • Method Detail

      • mapNullValue

        protected java.lang.Object mapNullValue​(java.lang.Object value)
        Description copied from class: Long2ObjectHashMap
        Longerceptor for masking null values.
        Overrides:
        mapNullValue in class Long2ObjectHashMap<V>
        Parameters:
        value - value to mask.
        Returns:
        masked value.
      • unmapNullValue

        protected V unmapNullValue​(java.lang.Object value)
        Description copied from class: Long2ObjectHashMap
        Longerceptor for unmasking null values.
        Overrides:
        unmapNullValue in class Long2ObjectHashMap<V>
        Parameters:
        value - value to unmask.
        Returns:
        unmasked value.