Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- City city = (City) o;
- return population == city.population &&
- Objects.equals(id, city.id) &&
- Objects.equals(name, city.name);
- }
- @Override
- public int hashCode() {
- return Objects.hash(id, name, population);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement