This class represents adaptions of Java Collections Framework
collections to primitive collections of boolean values.
The adapter is implemented as a wrapper around the collection.
Thus, changes to the underlying collection are reflected by this
collection and vice versa.
Adapters from JCF collections to primitive collections will
fail if the JCF collection contains null values or
values of the wrong class. However, adapters are not fast
failing in the case that the underlying collection should
contain illegal values. To implement fast failure would require
every operation to check every element of the underlying
collection before doing anything. Instead validation methods
are provided. They can be called using the assertion facility
in the client code:
CollectionToBooleanCollectionAdapter s;
...
assert s.validate();
or by letting the adapter throw an exception on illegal values:
CollectionToBooleanCollectionAdapter 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 20-08-2003 23:18 since: 1.0 |