Class TFloatByteHashMap

    • Field Detail

      • _values

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

      • TFloatByteHashMap

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

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

        public TFloatByteHashMap(int initialCapacity,
                                 float loadFactor)
        Creates a new TFloatByteHashMap 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
      • TFloatByteHashMap

        public TFloatByteHashMap(int initialCapacity,
                                 float loadFactor,
                                 float noEntryKey,
                                 byte noEntryValue)
        Creates a new TFloatByteHashMap 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 float value that represents null for the Key set.
        noEntryValue - a byte value that represents null for the Value set.
      • TFloatByteHashMap

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

        public TFloatByteHashMap(TFloatByteMap map)
        Creates a new TFloatByteHashMap instance containing all of the entries in the map passed in.
        Parameters:
        map - a TFloatByteMap 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  TFloatByteHash
        Parameters:
        initialCapacity - an int value
        Returns:
        the actual capacity chosen
      • rehash

        protected void rehash(int newCapacity)
      • put

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

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

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

        public byte get(float key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public byte remove(float key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public float[] keys()
      • keys

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

        public byte[] values()
      • values

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

        public boolean containsValue(byte val)
      • containsKey

        public boolean containsKey(float key)
      • forEachValue

        public boolean forEachValue(TByteProcedure procedure)
      • transformValues

        public void transformValues(TByteFunction function)
      • increment

        public boolean increment(float key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()