aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/DataExample_post.jpage
diff options
context:
space:
mode:
Diffstat (limited to 'usage_examples/DataExample_post.jpage')
-rw-r--r--usage_examples/DataExample_post.jpage8
1 files changed, 8 insertions, 0 deletions
diff --git a/usage_examples/DataExample_post.jpage b/usage_examples/DataExample_post.jpage
index 29e7e328..e53e999c 100644
--- a/usage_examples/DataExample_post.jpage
+++ b/usage_examples/DataExample_post.jpage
@@ -42,6 +42,10 @@ public class DataExample {
return "DataExample(" + this.getName() + ", " + this.getAge() + ", " + this.getScore() + ", " + Arrays.deepToString(this.getTags()) + ")";
}
+ protected boolean canEqual(Object other) {
+ return other instanceof DataExample;
+ }
+
@Override public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof DataExample)) return false;
@@ -90,6 +94,10 @@ public class DataExample {
return "Exercise(name=" + this.getName() + ", value=" + this.getValue() + ")";
}
+ protected boolean canEqual(Object other) {
+ return other instanceof Exercise;
+ }
+
@Override public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof Exercise)) return false;