// An AList is an object of any class that implements // the AList interface. // interpretation: An Alist represents a finite partial map from K to V. interface AList { // Returns an association list like this one // except the given key is associated with the given value. AList extend (K key, V val); // Returns true iff the key is found within this AList. boolean contains (K key); // Returns the value associated with the given key. // Throws a NoSuchElementException if the key is not found. V lookup (K key); }