Often a Java class declaration is used to produce a new type.
This document argues that,
for these class declarations,
certain features should always be provided.
In particular,
the class should provide methods called
equals
and
hashCode,
and a means for cloning objects of the class.
If it is appropriate,
the class should also implement the
Comparable interface
(providing a method called compareTo).
The document also discusses the code that should be used for
equals,
hashCode,
compareTo
and
clone.
The text of the talk is available in the following formats: