-
Enhancement
-
Resolution: Not an Issue
-
P4
-
None
-
None
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
java 11 API documentation
A DESCRIPTION OF THE PROBLEM :
The problem is with the java.util.Comparator interface. As we know the Comparator interface is called the functional interface which also means these are the interfaces with exactly one abstract method, But in the Comparator documentation, in the method summary section, in abstract method section there are 2 methods listed, one is equals() and other is compare(). In both of them compare() is the abstract method, in case if any class implements this Comparator then it has a force contract to override the compare() only, not the equals()
java 11 API documentation
A DESCRIPTION OF THE PROBLEM :
The problem is with the java.util.Comparator interface. As we know the Comparator interface is called the functional interface which also means these are the interfaces with exactly one abstract method, But in the Comparator documentation, in the method summary section, in abstract method section there are 2 methods listed, one is equals() and other is compare(). In both of them compare() is the abstract method, in case if any class implements this Comparator then it has a force contract to override the compare() only, not the equals()