package ru.job4j.map;

import java.util.Calendar;

/**
 * Created on 28.07.17
 * User class.
 * @author Wamdue
 * @version 1.0
 */
public class User {
    /**
     * User name.
     */
    private String name;
    /**
     * Date of birthday.
     */
    private Calendar birthday;
    /**
     * Number of children.
     */
    private int children;

    /**
     * Empty constructor.
     */
    public User() {
    }

    /**
     * Main constructor.
     * @param name - user name.
     * @param birthday - birthday date.
     * @param children - number of children.
     */
    public User(String name, Calendar birthday, int children) {
        this.name = name;
        this.birthday = birthday;
        this.children = children;
    }

    /**
     *
     * @return user name.
     */
    public String getName() {
        return name;
    }

    /**
     *
     * @param name - new user name.
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *
     * @return date of birthday.
     */
    public Calendar getBirthday() {
        return birthday;
    }

    /**
     *
     * @param birthday set correct date of birthday.
     */
    public void setBirthday(Calendar birthday) {
        this.birthday = birthday;
    }

    /**
     *
     * @return current number of children.
     */
    public int getChildren() {
        return children;
    }

    /**
     *
     * @param children = new number of children.
     */
    public void setChildren(int children) {
        this.children = children;
    }
}

@@ -1549,11 +1549,258 @@
 n;%0A    %7D
+%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = name != null ? name.hashCode() : 0;%0A        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);%0A        result = 31 * result + children;%0A        return result;%0A    %7D
 %0A%7D%0A

refactor User class, add hashcode realization, task #1003.