Class HashTable

    • Field Detail

      • minHashSize

        @Deprecated
        protected static final int minHashSize
        Deprecated.
        Don't depend on this implementation detail. @noreference This field is not intended to be referenced by clients.
        See Also:
        Constant Field Values
      • currEntry

        protected int currEntry
      • hashTable

        protected int[] hashTable
      • nextTable

        protected int[] nextTable
    • Constructor Detail

      • HashTable

        public HashTable​(int initialSize)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • size

        public final int size()
      • resize

        protected void resize()
      • clear

        public void clear()
      • rehash

        protected void rehash()
      • resize

        protected void resize​(int size)
      • hash

        protected int hash​(int pos)
      • linkIntoHashTable

        protected final void linkIntoHashTable​(int i,
                                               int hash)
      • capacity

        public final int capacity()
      • removeEntry

        protected void removeEntry​(int i,
                                   int hash)
      • dumpNexts

        public void dumpNexts()
        For debugging only.
        Restriction:
        This method is not intended to be referenced by clients.
      • countCollisions

        public int countCollisions()
        Returns the number of collisions. For debugging only.
        Restriction:
        This method is not intended to be referenced by clients.