aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java')
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java
index 93b20e25..ac189f42 100644
--- a/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java
@@ -12,7 +12,27 @@ final class EqualsAndHashCodeWithExistingMethods2 {
}
final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithExistingMethods {
int x;
- public boolean canEqual(Object other) {
+ private boolean canEqual(Object other) {
return true;
}
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof EqualsAndHashCodeWithExistingMethods3)) return false;
+ final EqualsAndHashCodeWithExistingMethods3 other = (EqualsAndHashCodeWithExistingMethods3)o;
+ if (!other.canEqual((java.lang.Object)this)) return false;
+ if (!super.equals(o)) return false;
+ if (this.x != other.x) return false;
+ return true;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ result = result * PRIME + super.hashCode();
+ result = result * PRIME + this.x;
+ return result;
+ }
} \ No newline at end of file