Class AbstractHashTable

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable
    Direct Known Subclasses:
    TupleIndexHashTable

    public abstract class AbstractHashTable
    extends java.lang.Object
    implements java.io.Externalizable
    See Also:
    Serialized Form
    • Field Detail

      • size

        protected int size
      • threshold

        protected int threshold
      • loadFactor

        protected float loadFactor
    • Constructor Detail

      • AbstractHashTable

        public AbstractHashTable()
      • AbstractHashTable

        public AbstractHashTable​(int capacity,
                                 float loadFactor)
      • AbstractHashTable

        public AbstractHashTable​(TupleList[] table)
      • AbstractHashTable

        public AbstractHashTable​(float loadFactor,
                                 TupleList[] table)
    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • newIterator

        public Iterator newIterator()
      • ensureCapacity

        public void ensureCapacity​(int itemsToBeAdded)
      • resize

        protected void resize​(int newCapacity)
      • getResizeHashcode

        public abstract int getResizeHashcode​(TupleList entry)
      • size

        public int size()
      • isEmpty

        public boolean isEmpty()
      • indexOf

        protected static int indexOf​(int hashCode,
                                     int dataSize)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clear

        public void clear()