@Override public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof User)) return false; User u = (User) obj; return u.getName().equalsIgnoreCase(this.getName()); }
@Override public int compareTo(User u) { // sort users by name : return this.getName().compareTo(u.getName()); }