Class TByteDoubleHashMap

    • Field Detail

      • _values

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

      • TByteDoubleHashMap

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

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

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

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

        public TByteDoubleHashMap(byte[] keys,
                                  double[] values)
        Creates a new TByteDoubleHashMap instance containing all of the entries in the map passed in.
        Parameters:
        keys - a byte array containing the keys for the matching values.
        values - a double array containing the values.
      • TByteDoubleHashMap

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

        protected void rehash(int newCapacity)
      • put

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

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

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

        public double get(byte key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public double remove(byte key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public byte[] keys()
      • keys

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

        public double[] values()
      • values

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

        public boolean containsValue(double val)
      • containsKey

        public boolean containsKey(byte key)
      • increment

        public boolean increment(byte key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()