comapre to

@Override public int compareTo(@NotNull UserTO userTO) { if (email == null && userTO.email == null){ return 0; } else if (email != null && userTO.email == null) { return email.compareTo(""); } else if (email == null) { return userTO.email.compareTo(""); } return email.compareTo(userTO.email); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.