Class TFloatShortHashMap

    • Field Detail

      • _values

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

      • TFloatShortHashMap

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

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

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

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

        public TFloatShortHashMap(float[] keys,
                                  short[] values)
        Creates a new TFloatShortHashMap 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 short array containing the values.
      • TFloatShortHashMap

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

        protected void rehash(int newCapacity)
      • put

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

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

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

        public short get(float key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public short remove(float key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public float[] keys()
      • keys

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

        public short[] values()
      • values

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

        public boolean containsValue(short val)
      • containsKey

        public boolean containsKey(float key)
      • transformValues

        public void transformValues(TShortFunction function)
      • increment

        public boolean increment(float key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()