package ru.agolovin;

import java.util.Calendar;
import java.util.Objects;

/**
 * @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;
    }

    @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;
    }

//    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//        User user = (User) o;
//        return children == user.children &&
//                Objects.equals(name, user.name) &&
//                Objects.equals(birthday, user.birthday);
//    }
}

@@ -1074,24 +1074,26 @@
 day;%0A    %7D%0A%0A
+//
     @Overrid
@@ -1094,16 +1094,18 @@
 verride%0A
+//
     publ
@@ -1120,24 +1120,26 @@
 ashCode() %7B%0A
+//
         int 
@@ -1183,16 +1183,18 @@
 () : 0;%0A
+//
         
@@ -1218,32 +1218,34 @@
 ult + children;%0A
+//
         result =
@@ -1305,16 +1305,18 @@
 ) : 0);%0A
+//
         
@@ -1330,25 +1330,25 @@
 result;%0A
+//
     %7D%0A%0A
-//
     @Ove
@@ -1345,34 +1345,32 @@
 %0A%0A    @Override%0A
-//
     public boole
@@ -1387,26 +1387,24 @@
 Object o) %7B%0A
-//
         if (
@@ -1427,18 +1427,16 @@
 n true;%0A
-//
         
@@ -1494,18 +1494,16 @@
  false;%0A
-//
         
@@ -1524,18 +1524,16 @@
 ser) o;%0A
-//
         
@@ -1564,26 +1564,24 @@
 children &&%0A
-//
             
@@ -1619,18 +1619,16 @@
 ame) &&%0A
-//
         
@@ -1676,18 +1676,16 @@
 thday);%0A
-//
     %7D%0A%7D%0A

add task4 in part5 chapter5 package2