mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
added new test classes from lombok make code generation for equals and hashCode more lombok like GitOrigin-RevId: 3765b27a943fc03fbab6af9d80e03dbd35f1249e
71 lines
2.0 KiB
Java
71 lines
2.0 KiB
Java
class EqualsAndHashCodeConfigKeys2Object extends Object {
|
|
@Override
|
|
@SuppressWarnings("all")
|
|
public boolean equals(final Object o) {
|
|
if (o == this) return true;
|
|
if (!(o instanceof EqualsAndHashCodeConfigKeys2Object)) return false;
|
|
final EqualsAndHashCodeConfigKeys2Object other = (EqualsAndHashCodeConfigKeys2Object) o;
|
|
if (!other.canEqual((Object) this)) return false;
|
|
return true;
|
|
}
|
|
@SuppressWarnings("all")
|
|
protected boolean canEqual(final Object other) {
|
|
return other instanceof EqualsAndHashCodeConfigKeys2Object;
|
|
}
|
|
@Override
|
|
@SuppressWarnings("all")
|
|
public int hashCode() {
|
|
int result = 1;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
class EqualsAndHashCodeConfigKeys2Parent {
|
|
@Override
|
|
@SuppressWarnings("all")
|
|
public boolean equals(final Object o) {
|
|
if (o == this) return true;
|
|
if (!(o instanceof EqualsAndHashCodeConfigKeys2Parent)) return false;
|
|
final EqualsAndHashCodeConfigKeys2Parent other = (EqualsAndHashCodeConfigKeys2Parent) o;
|
|
if (!other.canEqual((Object) this)) return false;
|
|
return true;
|
|
}
|
|
@SuppressWarnings("all")
|
|
protected boolean canEqual(final Object other) {
|
|
return other instanceof EqualsAndHashCodeConfigKeys2Parent;
|
|
}
|
|
@Override
|
|
@SuppressWarnings("all")
|
|
public int hashCode() {
|
|
int result = 1;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
class EqualsAndHashCodeConfigKeys2 extends EqualsAndHashCodeConfigKeys2Parent {
|
|
int x;
|
|
@Override
|
|
@SuppressWarnings("all")
|
|
public boolean equals(final Object o) {
|
|
if (o == this) return true;
|
|
if (!(o instanceof EqualsAndHashCodeConfigKeys2)) return false;
|
|
final EqualsAndHashCodeConfigKeys2 other = (EqualsAndHashCodeConfigKeys2) o;
|
|
if (!other.canEqual((Object) this)) return false;
|
|
if (!super.equals(o)) return false;
|
|
if (this.x != other.x) return false;
|
|
return true;
|
|
}
|
|
@SuppressWarnings("all")
|
|
protected boolean canEqual(final Object other) {
|
|
return other instanceof EqualsAndHashCodeConfigKeys2;
|
|
}
|
|
@Override
|
|
@SuppressWarnings("all")
|
|
public int hashCode() {
|
|
final int PRIME = 59;
|
|
int result = super.hashCode();
|
|
result = result * PRIME + this.x;
|
|
return result;
|
|
}
|
|
}
|