Class TFloatCharHashMap

    • Field Detail

      • _values

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

      • TFloatCharHashMap

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

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

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

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

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

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

        protected void rehash(int newCapacity)
      • put

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

        public char putIfAbsent(float key,
                                char value)
      • get

        public char get(float key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public char remove(float key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public float[] keys()
      • keys

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

        public char[] values()
      • values

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

        public boolean containsValue(char val)
      • containsKey

        public boolean containsKey(float key)
      • forEachValue

        public boolean forEachValue(TCharProcedure procedure)
      • transformValues

        public void transformValues(TCharFunction function)
      • increment

        public boolean increment(float key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()