document: Implementing equals for mixed-type comparison The idea of comparing objects of different types is not entirely off base , in particular for classes from the same class hierarchy . After all , objects from the same class hierarchy -LRB- and by class hierarchy we mean all classes derived from a common superclass other than Object -RRB- have something in common , namely at least the superclass part . As we demonstrated in a previous paper -LRB- 2002 -RRB- , providing a correct implementation of a mixed-type comparison is a non-trivial task . In this article , we will show one way of implementing a mixed-type comparison of objects from the same class hierarchy that meets the requirements of the equals contract
doc_bio_tags: O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I
extractive_keyphrases: equals contract superclass
abstractive_keyphrases: java transitivity requirement mixed-type comparison