All Packages Class Hierarchy This Package Previous Next Index
Interface collections.ImplementationCheckable
- public interface interface ImplementationCheckable
- extends Assertable
ImplementationCheckable is an interface for classes possessing
a method that checks the consistency of an objects internal state.
-
checkImplementation()
- Check the consistency of internal state, and raise exception if
not OK.
checkImplementation
public abstract void checkImplementation() throws ImplementationError
- Check the consistency of internal state, and raise exception if
not OK.
These should be `best-effort' checks. You cannot always locally
determine full consistency, but can usually approximate it,
and validate the most important representation invariants.
The most common kinds of checks are cache checks. For example,
A linked list that also maintains a separate record of the
number of items on the list should verify that the recorded
count matches the number of elements in the list.
This method should either return normally or throw:
- Throws: ImplementationError
- if check fails
All Packages Class Hierarchy This Package Previous Next Index