Klasse LinkedEnum2ByteMap<T extends Enum<T>>

Typparameter:
T - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
Map<T,Byte>, ToByteFunction<T>, Object2ByteMap<T>, Object2ByteOrderedMap<T>

public class LinkedEnum2ByteMap<T extends Enum<T>> extends Enum2ByteMap<T> implements Object2ByteOrderedMap<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

    • LinkedEnum2ByteMap

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

      public LinkedEnum2ByteMap(T[] keys, Byte[] 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
    • LinkedEnum2ByteMap

      public LinkedEnum2ByteMap(T[] keys, byte[] 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
    • LinkedEnum2ByteMap

      public LinkedEnum2ByteMap(Map<? extends T,? extends Byte> 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
    • LinkedEnum2ByteMap

      public LinkedEnum2ByteMap(Object2ByteMap<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