@@ -0,0 +1,2120 @@
+/**%0A *%0A * @author Daniel Yuan%0A * %0A * This class is the element that will be stored in the hash table (array%0A * created in HashTable.java). The user can store up to three keys in this%0A * class, which will act as the %22bucket%22 in my program. This class has getter%0A * and setter methods for the key(s), collision tracking, and methods used for%0A * implementing linked lists for the chaining collision handling method.%0A */%0Apackage hashing;%0A%0A%0Apublic class TableEntry %7B%0A    private int key;%0A    %0A    //use the below keys when bucket size increases to 3%0A    private int key2;%0A    private int key3;%0A    %0A    //use when dealing with chaining%0A    private TableEntry next;%0A    %0A    private boolean collided;%0A    %0A    TableEntry(int key) %7B%0A        this.key = key;%0A        this.key2 = 0;%0A        this.key3 = 0;%0A        this.next = null;%0A        this.collided = false;%0A    %7D%0A    %0A    //Getters and setters for multiple keys%0A    public int getKey() %7B%0A        return key;%0A    %7D%0A    %0A    public int getKeyII()%7B%0A        return key2;%0A    %7D%0A    %0A    public int getKeyIII()%7B%0A        return key3;%0A    %7D%0A    %0A    public void setKeyII(int key2)%7B%0A        this.key2 = key2;%0A    %7D%0A    %0A    public void setKeyIII(int key3)%7B%0A        this.key3 = key3;%0A    %7D%0A    %0A    //The two following methods are used to differentiate table entry objects%0A    //that has bumped into a collision vs. those that did not%0A    public void setCollide()%7B%0A        this.collided = true;%0A    %7D%0A    %0A    public boolean hasCollided()%7B%0A        return this.collided;%0A    %7D%0A    %0A    //Two Methods below are for the linked list/chaining sections%0A    //Get the next entry in the list/chain.%0A    public TableEntry getNext()%7B%0A        return next;%0A    %7D%0A    %0A    //Add a new element to the chain, used for chaining collision handling%0A    public void addEntry (TableEntry newEntry)%7B%0A        this.next = newEntry;%0A    %7D%0A    %0A    //Boolean to check if the bucket is full, return true if full, not used%0A    //in this program.%0A    public boolean fullBucket()%7B%0A        if((key != 0) && (key2 != 0) && (key3 != 0))%7B%0A            return true;%0A        %7D%0A        return false;%0A    %7D%0A        %0A%7D   %0A%0A

Create TableEntry.java