The Java Course provides a general introduction to programming in Java. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details.


The Table ADT

Like the other ADTs we have looked at, Tables are defined by the set of operations they support:

constructor
Make a new, empty table.
put
Create an entry that associates a value with a key.
get
For a given key, find the corresponding value.
containsKey
Return true if there is an entry in the Table with the given Key.
keys
: Return a collection that contains all the keys in the Table.


Last Update: 2011-01-24