2022-04-07 18:43:21 +02:00

8 lines
208 B
Java

package ch.epfl.test;
public interface ObjectTest {
public static boolean hashCodeIsCompatibleWithEquals(Object o1, Object o2) {
return ! o1.equals(o2) || o1.hashCode() == o2.hashCode();
}
}