Enforce "equals" in an interface
Posted
by Fredrik
on Stack Overflow
See other posts from Stack Overflow
or by Fredrik
Published on 2010-06-10T06:19:25Z
Indexed on
2010/06/10
6:22 UTC
Read the original article
Hit count: 142
java
I have an interface and I want everyone who implements this interface to implements an overrridden "equals" method.
Is there a way to make sure that happens?
The way I guess this will happen is that the class that implements my interface will automatically get the equals from Object therefore making the interface happy.
© Stack Overflow or respective owner