Java
7
Вклад в тег
Type superClass = getClass().getGenericSuperclass();
//..
if (!(o instanceof A) {
return false;
}
if (!(o instanceof B)) {
return this.equals(o);
}
//..
There is no way to extend an instantiable class and add a value component while preserving the equals contract