package ru.job4j.map;

import java.util.Calendar;

/**
 * User.
 *
 * @author Stanislav (376825@mail.ru)
 * @since 20.09.2017
 */
public class User {
    /**
     */
    private String name;
    /**
     */
    private int children;
    /**
     */
    private Calendar birthday;

    /**
     * Constructor.
     * @param name - String
     * @param children - int
     * @param birthday - Calendar
     */
    public User(String name, int children, Calendar birthday) {
        this.name = name;
        this.children = children;
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "User{" + "name='" + name + '\''
                + ", children=" + children
                + ", 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;
    }
}
@@ -788,221 +788,445 @@
 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) %7B%0A            return true;%0A        %7D%0A        if (o == null %7C%7C getClass() != o.getClass()) %7B%0A            return false;%0A        %7D%0A%0A        User user = (User) o;%0A%0A        if (children != user.children) return false;%0A        if (name != null ? !name.equals(user.name) : user.name != null) return false;%0A        return birthday != null ? birthday.equals(user.birthday) : user.birthday == null
 ;%0A  

task 1004