Class TByteFloatHashMap

    • Field Detail

      • _values

        protected transient float[] _values
        the values of the map
    • Constructor Detail

      • TByteFloatHashMap

        public TByteFloatHashMap()
        Creates a new TByteFloatHashMap instance with the default capacity and load factor.
      • TByteFloatHashMap

        public TByteFloatHashMap(int initialCapacity)
        Creates a new TByteFloatHashMap instance with a prime capacity equal to or greater than initialCapacity and with the default load factor.
        Parameters:
        initialCapacity - an int value
      • TByteFloatHashMap

        public TByteFloatHashMap(int initialCapacity,
                                 float loadFactor)
        Creates a new TByteFloatHashMap instance with a prime capacity equal to or greater than initialCapacity and with the specified load factor.
        Parameters:
        initialCapacity - an int value
        loadFactor - a float value
      • TByteFloatHashMap

        public TByteFloatHashMap(int initialCapacity,
                                 float loadFactor,
                                 byte noEntryKey,
                                 float noEntryValue)
        Creates a new TByteFloatHashMap instance with a prime capacity equal to or greater than initialCapacity and with the specified load factor.
        Parameters:
        initialCapacity - an int value
        loadFactor - a float value
        noEntryKey - a byte value that represents null for the Key set.
        noEntryValue - a float value that represents null for the Value set.
      • TByteFloatHashMap

        public TByteFloatHashMap(byte[] keys,
                                 float[] values)
        Creates a new TByteFloatHashMap instance containing all of the entries in the map passed in.
        Parameters:
        keys - a byte array containing the keys for the matching values.
        values - a float array containing the values.
      • TByteFloatHashMap

        public TByteFloatHashMap(TByteFloatMap map)
        Creates a new TByteFloatHashMap instance containing all of the entries in the map passed in.
        Parameters:
        map - a TByteFloatMap that will be duplicated.
    • Method Detail

      • setUp

        protected int setUp(int initialCapacity)
        initializes the hashtable to a prime capacity which is at least initialCapacity + 1.
        Overrides:
        setUp in class  TByteFloatHash
        Parameters:
        initialCapacity - an int value
        Returns:
        the actual capacity chosen
      • rehash

        protected void rehash(int newCapacity)
      • put

        public float put(byte key,
                         float value)
      • putIfAbsent

        public float putIfAbsent(byte key,
                                 float value)
      • putAll

        public void putAll(Map<? extends Byte,? extends Float> map)
      • get

        public float get(byte key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public float remove(byte key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public byte[] keys()
      • keys

        public byte[] keys(byte[] array)
      • values

        public float[] values()
      • values

        public float[] values(float[] array)
      • containsValue

        public boolean containsValue(float val)
      • containsKey

        public boolean containsKey(byte key)
      • transformValues

        public void transformValues(TFloatFunction function)
      • increment

        public boolean increment(byte key)
      • adjustValue

        public boolean adjustValue(byte key,
                                   float amount)
      • adjustOrPutValue

        public float adjustOrPutValue(byte key,
                                      float adjust_amount,
                                      float put_amount)
      • equals

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()