This class is the most efficient way to uses multiple keys to map to a value.
The best way to use this class is via the additional map-style methods.
These provide get, containsKey, put and
remove for individual keys which operate without extra object creation.

The additional methods are the main interface of this map.
As such, you will not normally hold this map in a variable of type Map.

The normal map methods take in and return a MultiKey.
If you try to use put() with any other object type a
ClassCastException is thrown. If you try to use null as
the key in put() a NullPointerException is thrown.

This map is implemented as a decorator of a AbstractHashedMap which
enables extra behaviour to be added easily.

Note that MultiKeyMap is not synchronized and is not thread-safe.
If you wish to use this map from multiple threads concurrently, you must use
appropriate synchronization. This class may throw exceptions when accessed
by concurrent threads without synchronization.

Constructor Detail

MultiKeyMap

MultiKeyMap

Constructor that decorates the specified map and is called from
multiKeyMap(AbstractHashedMap).
The map must not be null and should be empty or only contain valid keys.
This constructor performs no validation.