package ru.job4j.mapdiscovery;

import java.util.Calendar;

/**.
 * Class User.
 * @author Mikhail Vlasov
 * @since 04.29.2018
 * @version 1
 */
public class User {
    /**.
     * name of the user.
     */
    private String name;
    /**.
     * @param children quantity.
     */
    private int children;
    /**.
     * @param birthday of the user.
     */
    private Calendar birthday;

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

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

    /**.
     * Gets children quantity.
     * @return int children quantity of the user.
     */
    public int getChildren() {
        return children;
    }

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

    /**.
     * Overrides hashCode using name, children and birthday.
     * @return int hash code.
     */
    @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;
    }
}

@@ -1250,24 +1250,26 @@
 de.%0A     */%0A
+/*
     @Overrid
@@ -1496,16 +1496,884 @@
 result;%0A
+    %7D*/%0A%0A    /**.%0A     * Overrides equals, compares fields name, children and birthday.%0A     * @return boolean true or false.%0A     */%0A    @Override%0A    public 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) %7B%0A            return false;%0A        %7D%0A        if (name != null ? !name.equals(user.name) : user.name != null) %7B%0A            return false;%0A        %7D%0A        return birthday != null ? birthday.equals(user.birthday) : user.birthday == null;%0A    %7D%0A%0A    /**.%0A     * Overrides hashCode using Object's hashCode().%0A     * Couldn't skip, audit tool cried.%0A     * @return int hash code.%0A     */%0A    @Override%0A    public int hashCode() %7B%0A        return super.hashCode();%0A
     %7D%0A%7D%0A

Task 1004