next up previous index
Next: Implementation Up: Lookup tables Previous: Lookup tables   Index

Comment

Our LookupTable is similar to the Dictionary abstract class in java.util. A principal difference concerns the way in which the null object is treated. In our specification the null object may be used both as a key and as a value. A request to lookup a key which is not present throws a NoSuchElementException. In this respect the specifications of put and get, corresponding to our add and lookup, in java.util.Dictionary and its implementation in java.util.HashTable, seem less straightforward. See Dictionary.put and Dictionary.get. Compare also Map.put and especially Map.get, which are meant to specify Hashtable.put and Hashtable.get.

Peter Williams 2005-06-07