mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
18 lines
378 B
Java
18 lines
378 B
Java
import java.util.Objects;
|
|
|
|
class X {
|
|
private String s = null;
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) return true;
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
final X x = (X) o;
|
|
return Objects.equals(s, x.s);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hashCode(s);
|
|
}
|
|
} |