![java](https://habrastorage.org/r/w120/webt/5a/7f/c4/5a7fc421810ca922341023.png)
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