Klasse LinkedEnum2FloatMap<T extends Enum<T>>

Typparameter:
T - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
Map<T,Float>, ToFloatFunction<T>, Object2FloatMap<T>, Object2FloatOrderedMap<T>

public class LinkedEnum2FloatMap<T extends Enum<T>> extends Enum2FloatMap<T> implements Object2FloatOrderedMap<T>
A Type Specific LinkedEnumMap implementation that allows for Primitive Values and faster iteration. Unlike javas implementation this one does not jump around between a single long or long array implementation based around the enum size This will cause a bit more memory usage but allows for a simpler implementation.
  • Konstruktordetails

    • LinkedEnum2FloatMap

      public LinkedEnum2FloatMap(Class<T> keyType)
      Default Constructor
      Parameter:
      keyType - the type of Enum that should be used
    • LinkedEnum2FloatMap

      public LinkedEnum2FloatMap(T[] keys, Float[] values)
      Helper constructor that allow to create a EnumMap from boxed values (it will unbox them)
      Parameter:
      keys - the keys that should be put into the EnumMap
      values - the values that should be put into the EnumMap.
      Löst aus:
      IllegalStateException - if the keys and values do not match in lenght
    • LinkedEnum2FloatMap

      public LinkedEnum2FloatMap(T[] keys, float[] values)
      Helper constructor that allow to create a EnumMap from unboxed values
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      Löst aus:
      IllegalStateException - if the keys and values do not match in lenght
    • LinkedEnum2FloatMap

      public LinkedEnum2FloatMap(Map<? extends T,? extends Float> map)
      A Helper constructor that allows to create a EnumMap with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
    • LinkedEnum2FloatMap

      public LinkedEnum2FloatMap(Object2FloatMap<T> map)
      A Type Specific Helper function that allows to create a new EnumMap with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
  • Methodendetails