From 3f8d286eb835bd6fe4cc0411e7cc88d7fffd4ab7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 23 Oct 2022 18:33:17 +0200 Subject: [PATCH] Continued: - compare more than just user name and contact instance so it can be sorted by them as well --- src/org/mxchange/jusercore/model/user/LoginUser.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 -- 2.39.5