boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Pet pet = (Pet) o; if (!birthDay.equals(pet.birthDay)) return false; if (!name.equals(pet.name)) return false; if (!owner.equals(pet.owner)) return false; return true; }