[an error occurred while processing this directive]

Table Interface Client Specifications


Purpose

The Table interface defines methods common to all table implementations. A table provides storage and random access retrieval and removal of data associated with keys. The association between keys and data is established when data is added to a Table. A related interface Dictionary should be used when entries contain their own keys.

Importing Information

Use of the Table interface requires the following imports.
import collection.Table;
import collection.Iterator;

Client Data Model

A Table supports standard random-access table operations. Entries can be added by calling add(), specifying the key and data as parameters. Entries with duplicate keys are not permitted. Entries can be retrieved or removed with dataFor() or remove(). All entries can be removed by calling clear().

You can check if there is an entry with a specified key by calling isKey(). The returned value is a precondition for add(), dataFor(), and remove().

This class has a submodule that provides iterator methods for Tables. See TableIterator Interface Client Specifications.

Error handling policy
All precondition violations result in throwing a IllegalArgumentException. A IllegalArgumentException is an unchecked exception.

Public Methods

Constructors
Data Retrieval
Data Modification
Iteration
[an error occurred while processing this directive]