This class represents adaptions of Java Collections Framework
list iterators to primitive list iterators over byte values.
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:
CollectionToByteCollectionAdapter s;
...
assert s.validate();
or by letting the adapter throw an exception on illegal values:
CollectionToByteCollectionAdapter 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:17 since: 1.0 |