package ru.job4j;

import java.util.Calendar;

public class UserM {
    private String name;
    private int children;
    private Calendar birthday;

    public UserM(String name, int children, Calendar birthday) {
        this.name = name;
        this.children = children;
        this.birthday = birthday;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + children;
        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);
        return result;
    }

    public String getName() {
        return name;
    }

    public int getChildren() {
        return children;
    }

    public Calendar getBirthday() {
        return birthday;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setChildren(int children) {
        this.children = children;
    }

    public void setBirthday(Calendar birthday) {
        this.birthday = birthday;
    }
}

@@ -339,221 +339,405 @@
 lic 
-int hashCode() %7B%0A        int result = name != null ? name.hashCode() : 0;%0A        result = 31 * result + children;%0A        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);%0A        return result
+boolean equals(Object o) %7B%0A        if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A        UserM userM = (UserM) o;%0A%0A        if (children != userM.children) return false;%0A        if (name != null ? !name.equals(userM.name) : userM.name != null) return false;%0A        return birthday != null ? birthday.equals(userM.birthday) : userM.birthday == null
 ;%0A  

task 1004