Class UserFullNameComparator
java.lang.Object
de.uplanet.lucy.server.auxiliaries.comparator.UserFullNameComparator
- All Implemented Interfaces:
Comparator<de.uplanet.lucy.server.usermanager.IUser>
public final class UserFullNameComparator
extends Object
implements Comparator<de.uplanet.lucy.server.usermanager.IUser>
Compare
IUser
objects by their
display name. null
values have high precedence. By default
names are built with title but without commas.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(de.uplanet.lucy.server.usermanager.IUser p_obj1, de.uplanet.lucy.server.usermanager.IUser p_obj2) void
setAscending
(boolean p_bAscending) Set this comparator to ascending or descending sort order.void
setWithComma
(boolean p_bWithComma) void
setWithTitle
(boolean p_bWithTitle) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
UserFullNameComparator
public UserFullNameComparator()
-
-
Method Details
-
compare
public int compare(de.uplanet.lucy.server.usermanager.IUser p_obj1, de.uplanet.lucy.server.usermanager.IUser p_obj2) - Specified by:
compare
in interfaceComparator<de.uplanet.lucy.server.usermanager.IUser>
-
setAscending
public void setAscending(boolean p_bAscending) Set this comparator to ascending or descending sort order.- Parameters:
p_bAscending
-true
if ascending sort order should be used, orfalse
otherwise.
-
setWithTitle
public void setWithTitle(boolean p_bWithTitle) - Parameters:
p_bWithTitle
-true
if names should be built with title, orfalse
otherwise.
-
setWithComma
public void setWithComma(boolean p_bWithComma) - Parameters:
p_bWithComma
-true
if names should be built with commas, orfalse
otherwise.
-