package ru.agolovin;

import java.util.Calendar;

/**
 * @author agolovin (agolovin@list.ru)
 * @version $Id$
 * @since 0.1
 */
public class User {

    /**
     * User name.
     */
    private String name;
    /**
     * Qunat user child.
     */
    private int children;
    /**
     * User birthday.
     */
    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;
    }


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

    /**
     * Get user childs.
     *
     * @return child int
     */
    public int getChildren() {
        return children;
    }

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

}

@@ -41,16 +41,42 @@
 alendar;
+%0Aimport java.util.Objects;
 %0A%0A/**%0A *
@@ -1078,10 +1078,618 @@
 %0A    %7D%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%0A//    @Override%0A//    public boolean equals(Object o) %7B%0A//        if (this == o) return true;%0A//        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A//        User user = (User) o;%0A//        return children == user.children &&%0A//                Objects.equals(name, user.name) &&%0A//                Objects.equals(birthday, user.birthday);%0A//    %7D%0A
 %7D%0A

add task3 in part5 chapter5 package2