@@ -0,0 +1,2059 @@
+public abstract class HashTable%0A%7B%0A      /* Data fields */%0A%0A    protected Object%5B%5D table; //The hash table itself%0A    protected int count; //Number of elements in table%0A    protected int table_size; //Number of hash buckets%0A    protected float load_factor; //Max ratio of elements to buckets%0A    protected int threshold; //Max count as determined by load factor%0A%0A      /* Constructor */%0A%0A    protected HashTable(int initial_size, float load_factor)%0A    %7B%0A        if(initial_size %3C= 0 %7C%7C load_factor %3C= 0f)%0A        %7B%0A            throw new IllegalArgumentException%0A                    (%22Size and load factor must both be greater than zero.%22);%0A        %7D //end if%0A        this.load_factor = load_factor;%0A        init(initial_size);%0A    %7D //end ctor%0A%0A    public HashTable()%0A    %7B%0A        this(127, 0.5f);%0A    %7D //end ctor%0A%0A      /* Protected methods */%0A%0A    protected void init(int initial_size)%0A    %7B%0A        this.count = 0;%0A        this.table_size = nextPrime(initial_size);%0A        this.table = new Object%5Btable_size%5D;%0A        this.threshold = (int)(load_factor * table_size);%0A    %7D //end init%0A%0A    protected final int nextPrime(int n)%0A    %7B%0A        if(n %3E 3)%0A        %7B%0A          OUTER:%0A            for(n %7C= 1 ;; n += 2)%0A            %7B //Skip over even numbers.%0A                for(int i = 3; i*i %3C= n; i += 2)%0A                %7B //Check factors up to the square root of n.%0A                    if(n %25 i == 0)%0A                    %7B //Not prime.%0A                        continue OUTER;%0A                    %7D%0A                %7D //end if:for:for%0A                break;%0A            %7D //end if:for%0A        %7D //end if%0A        return n;%0A    %7D //end nextPrime%0A%0A    protected final int hashIndex(Object data)%0A    %7B%0A        int index = data.hashCode() %25 table_size;%0A        if(index %3C 0)%0A        %7B%0A            index += table_size;%0A        %7D //end if%0A        return index;%0A    %7D //end hashIndex%0A%0A    protected void rehash()%0A    %7B%0A        init(table_size * 2);%0A    %7D //end rehash%0A%0A    public boolean empty()%0A    %7B%0A        return count == 0;%0A    %7D //end empty%0A%0A%7D //end HashTable%0A

Create HashTable.java