From: Roland Häder Date: Sun, 23 Oct 2022 16:33:17 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3f8d286eb835bd6fe4cc0411e7cc88d7fffd4ab7;p=juser-core.git Continued: - compare more than just user name and contact instance so it can be sorted by them as well --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index a8caa50..9a3b346 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -231,8 +231,16 @@ public class LoginUser implements User { final int comparitors[] = { // First contact ContactUtils.compare(this.getUserContact(), user.getUserContact()), - // ... then user name - this.getUserName().compareTo(user.getUserName()) + // ... then user name (case-insensitive) + this.getUserName().compareToIgnoreCase(user.getUserName()), + // ... account status + this.getUserAccountStatus().compareTo(user.getUserAccountStatus()), + // ... profile mode + this.getUserProfileMode().compareTo(user.getUserProfileMode()), + // ... "must change password" flag + this.getUserMustChangePassword().compareTo(user.getUserMustChangePassword()), + // ... confirm key + this.getUserConfirmKey().compareTo(user.getUserConfirmKey()) }; // Check all values