package ru.apetrov.user;

import java.util.Calendar;

/**
 * Created by Andrey on 10.04.2017.
 */
public class User {

    /**
     * user name.
     */
    private final String name;

    /**
     * amount of children.
     */
    private final int children;

    /**
     * birthday of user.
     */
    private final Calendar birthday;

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

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

    /**
     * getter.
     * @return amount of children.
     */
    public int getChildren() {
        return children;
    }

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

@@ -1026,11 +1026,317 @@
 y;%0A    %7D
+%0A%0A    /**%0A     * hash code.%0A     * @return hash code%0A     */%0A    @Override%0A    public 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;%0A    %7D
 %0A%7D%0A

add lesson 5.5.3 - Main