Class TFloatDoubleHashMap

    • Field Detail

      • _values

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

      • TFloatDoubleHashMap

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

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

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

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

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

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

        protected void rehash(int newCapacity)
      • put

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

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

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

        public double get(float key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public double remove(float key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public float[] keys()
      • keys

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

        public double[] values()
      • values

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

        public boolean containsValue(double val)
      • containsKey

        public boolean containsKey(float key)
      • increment

        public boolean increment(float key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()