Interface HashTable
access this type via: data.adt.HashTable (provides, requires or uses)
A data store of key:value pairs. Each key that is put into the hash table should be unique.
Transfer fields
HashTableItem content[]
Functions
void put(char key[], storeData value)
void update(char key[], storeData newValue)
Data get(char key[])
void delete(char key[])
int getLength()
HashTableItem[] getContents()
Transfer fields
content The contents of the hash table.
void put(char key[], storeData value)
Add a new key:value pair to the hash table.
void update(char key[], storeData newValue)
Update an existing key:value pair to have a new value.
Data get(char key[])
Get the value of a given key.
void delete(char key[])
Remove a key:value pair from the hash table.
int getLength()
Get the number of key:value pairs stored in the hash table.
HashTableItem[] getContents()
Get the contents of the hash table as an array.