mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-12 10:13:54 +00:00
44 lines
1.4 KiB
Java
44 lines
1.4 KiB
Java
class EqualsAndHashCodeEmpty {
|
|
@java.lang.Override
|
|
@java.lang.SuppressWarnings("all")
|
|
public boolean equals(final java.lang.Object o) {
|
|
if (o == this) return true;
|
|
if (!(o instanceof EqualsAndHashCodeEmpty)) return false;
|
|
final EqualsAndHashCodeEmpty other = (EqualsAndHashCodeEmpty) o;
|
|
if (!other.canEqual((java.lang.Object) this)) return false;
|
|
return true;
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
protected boolean canEqual(final java.lang.Object other) {
|
|
return other instanceof EqualsAndHashCodeEmpty;
|
|
}
|
|
@java.lang.Override
|
|
@java.lang.SuppressWarnings("all")
|
|
public int hashCode() {
|
|
final int result = 1;
|
|
return result;
|
|
}
|
|
}
|
|
class EqualsAndHashCodeEmptyWithSuper extends EqualsAndHashCodeEmpty {
|
|
@java.lang.Override
|
|
@java.lang.SuppressWarnings("all")
|
|
public boolean equals(final java.lang.Object o) {
|
|
if (o == this) return true;
|
|
if (!(o instanceof EqualsAndHashCodeEmptyWithSuper)) return false;
|
|
final EqualsAndHashCodeEmptyWithSuper other = (EqualsAndHashCodeEmptyWithSuper) o;
|
|
if (!other.canEqual((java.lang.Object) this)) return false;
|
|
if (!super.equals(o)) return false;
|
|
return true;
|
|
}
|
|
@java.lang.SuppressWarnings("all")
|
|
protected boolean canEqual(final java.lang.Object other) {
|
|
return other instanceof EqualsAndHashCodeEmptyWithSuper;
|
|
}
|
|
@java.lang.Override
|
|
@java.lang.SuppressWarnings("all")
|
|
public int hashCode() {
|
|
final int result = super.hashCode();
|
|
return result;
|
|
}
|
|
}
|