Klasse Long2ObjectLinkedOpenCustomHashMap<V>

Typparameter:
V - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
LongFunction<V>, Map<Long,V>, LongFunction<V>, Long2ObjectMap<V>, Long2ObjectOrderedMap<V>, ITrimmable

public class Long2ObjectLinkedOpenCustomHashMap<V> extends Long2ObjectOpenCustomHashMap<V> implements Long2ObjectOrderedMap<V>
A Type Specific LinkedHashMap that allows for custom HashControl. That uses arrays to create links between nodes. For cases where Objects/primitive do not allow hashcoding this can be really useful and provide a lot of control. This implementation of SortedMap does not support SubMaps of any kind. It implements the interface due to sortability and first/last access
  • Konstruktordetails

    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(LongStrategy strategy)
      Default Constructor
      Parameter:
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(int minCapacity, LongStrategy strategy)
      Constructor that defines the minimum capacity
      Parameter:
      minCapacity - the minimum capacity the HashMap is allowed to be.
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the minimum capacity is negative
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(int minCapacity, float loadFactor, LongStrategy strategy)
      Constructor that defines the minimum capacity and load factor
      Parameter:
      minCapacity - the minimum capacity the HashMap is allowed to be.
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the minimum capacity is negative
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(Long[] keys, V[] values, LongStrategy strategy)
      Helper constructor that allow to create a map from boxed values (it will unbox them)
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the keys and values do not match in lenght
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(Long[] keys, V[] values, float loadFactor, LongStrategy strategy)
      Helper constructor that allow to create a map from boxed values (it will unbox them)
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the keys and values do not match in lenght
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(long[] keys, V[] values, LongStrategy strategy)
      Helper constructor that allow to create a map from unboxed values
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the keys and values do not match in lenght
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(long[] keys, V[] values, float loadFactor, LongStrategy strategy)
      Helper constructor that allow to create a map from unboxed values
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the keys and values do not match in lenght
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(Map<? extends Long,? extends V> map, LongStrategy strategy)
      A Helper constructor that allows to create a Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(Map<? extends Long,? extends V> map, float loadFactor, LongStrategy strategy)
      A Helper constructor that allows to create a Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(Long2ObjectMap<V> map, LongStrategy strategy)
      A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • Long2ObjectLinkedOpenCustomHashMap

      public Long2ObjectLinkedOpenCustomHashMap(Long2ObjectMap<V> map, float loadFactor, LongStrategy strategy)
      A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
  • Methodendetails