blob: 6f0b573850c027740b2aae488fd19840c1401915 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
public class EqualsAndHashCodeInAnonymousClass {
Object annonymous = new Object() {
class Inner {
private String string;
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Inner)) return false;
final Inner other = (Inner) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$string = this.string;
final java.lang.Object other$string = other.string;
if (this$string == null ? other$string != null : !this$string.equals(other$string)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $string = this.string;
result = result * PRIME + ($string == null ? 43 : $string.hashCode());
return result;
}
}
};
}
|