Class TFloatLongHashMap

    • Field Detail

      • _values

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

      • TFloatLongHashMap

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

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

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

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

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

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

        protected void rehash(int newCapacity)
      • put

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

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

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

        public long get(float key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public long remove(float key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public float[] keys()
      • keys

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

        public long[] values()
      • values

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

        public boolean containsValue(long val)
      • containsKey

        public boolean containsKey(float key)
      • forEachValue

        public boolean forEachValue(TLongProcedure procedure)
      • transformValues

        public void transformValues(TLongFunction function)
      • increment

        public boolean increment(float key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()