Class TLongLongHashMap

    • Field Detail

      • _values

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

      • TLongLongHashMap

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

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

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

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

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

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

        protected void rehash(int newCapacity)
      • put

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

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

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

        public long get(long key)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • remove

        public long remove(long key)
      • removeAt

        protected void removeAt(int index)
      • keys

        public long[] keys()
      • keys

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

        public long[] values()
      • values

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

        public boolean containsValue(long val)
      • containsKey

        public boolean containsKey(long key)
      • forEachValue

        public boolean forEachValue(TLongProcedure procedure)
      • transformValues

        public void transformValues(TLongFunction function)
      • increment

        public boolean increment(long key)
      • adjustValue

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

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

        public boolean equals(Object other)
      • hashCode

        public int hashCode()
      • toString

        public String toString()