Class TFloatFloatHashMap

    • Field Detail

      • _values

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

      • TFloatFloatHashMap

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

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

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

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

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

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

        protected void rehash(int newCapacity)
      • put

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

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

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

        public float get(float key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public float remove(float key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public float[] keys()
      • keys

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

        public float[] values()
      • values

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

        public boolean containsValue(float val)
      • containsKey

        public boolean containsKey(float key)
      • transformValues

        public void transformValues(TFloatFunction function)
      • increment

        public boolean increment(float key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()