File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Comparator interface define equals method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Comparator interface define equals method" Watch "Comparator interface define equals method" New topic
Author

Comparator interface define equals method

Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
I've looked inside the jdk sources and, namely, in Comparator interface. I've found strange that Comparator interface define the method: "boolean equals(Object object)". Why does it define that method? Anyway, it's implemented in Object already?


If you think you've done too much, usually it means you've done too few.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19719
    
  20

The Javadoc adds some extra rules on the method.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Comparator interface define equals method