Closed AlejandroLoutphi closed 3 months ago
OK, so it technically works now in 1-hash-table
branch, but I'd like to redo some things
You can iterate over the table by using the getTableArray()
method and just iterating as if it was an array right now, but I kinda want to redesign the hashTable class to use inheritance instead to reduce the amount of pointers we have to access
Things to do:
We might also want to get rid of Box<E>
, since GenericArray<E>
is a superior implementation of Generic Arrays compared to Box<E>[]
in every way
It has to be able to house any input of type E
Its hash function needs to take in a String and return an int from 0 to length
[x] Create Hash Table class and Constructor
[x] Hash Function
[x] isEmpty() method
[x] boolean add(E elt, String hashInput) method
[x] E contains(E elt) method
[x] some way to iterate over all elements in the table
We can add more methods later
This class will be used for both the hash table storing the abstracts themselves, as well as a hash table storing Keywords