package ru.matevosyan;

public class User implements Comparable<User> {

    private final String name;

    private final int age;

    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    @Override
    public int compareTo(User user) {
        return String.valueOf(this.age).compareTo(String.valueOf(user.getAge()));
    }
}

@@ -17,16 +17,111 @@
 osyan;%0A%0A
+/**%0A * User class.%0A * Created on 28.04.2017.%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0A
 public c
@@ -192,17 +192,16 @@
 g name;%0A
-%0A
     priv
@@ -228,210 +228,612 @@
     
-public User(String name, int age) %7B%0A        this.name = name;%0A        this.age = age;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public int getAge() %7B%0A        return age;%0A    %7D
+/**%0A     * User class constructor.%0A     * @param name User name.%0A     * @param age User age.%0A     */%0A%0A    public User(String name, int age) %7B%0A        this.name = name;%0A        this.age = age;%0A    %7D%0A%0A    /**%0A     * Getter to get User name.%0A     * @return User name.%0A     */%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    /**%0A     * Getter to get User age.%0A     * @return User name.%0A     */%0A%0A    public int getAge() %7B%0A        return age;%0A    %7D%0A%0A    /**%0A     * Override compareTo(User user) method to compare users by age.%0A     * @param user is User object.%0A     * @return int value.%0A     */
 %0A%0A  

add javadoc to User.java