This class represents adaptions of Java Collections Framework
maps to primitive maps from float values to objects.
The adapter is implemented as a wrapper around the map.
Thus, changes to the underlying map are reflected by this
map and vice versa.
Adapters from JCF maps to primitive map will
fail if the JCF collection contains null keys or
keys of the wrong class. However, adapters are not fast
failing in the case that the underlying map should
contain illegal keys. To implement fast failure would require
every operation to check every key of the underlying
map before doing anything. Instead validation methods
are provided. They can be called using the assertion facility
in the client code:
MapToFloatKeyMapAdapter s;
...
assert s.validate();
or by letting the adapter throw an exception on illegal values:
MapToFloatKeyMapAdapter s;
...
s.evalidate(); // Throws an exception on illegal values
Either way, validation must be invoked directly by the client
code.
author: Søren Bak version: 1.2 21-08-2003 19:10 since: 1.0 |