com.atlassian.jira.issue.comparator
Class ApplicationUserBestNameComparator

java.lang.Object
  extended by com.atlassian.jira.issue.comparator.ApplicationUserBestNameComparator
All Implemented Interfaces:
Comparator<ApplicationUser>

public class ApplicationUserBestNameComparator
extends Object
implements Comparator<ApplicationUser>

This comparator tries to compare two users based on their 'best name' ie their full name if possible, otherwise their username.

This comparator completely ignores case. This uses the users locale to make sure that we correctly sort i18n characters.

Since:
v6.0

Constructor Summary
ApplicationUserBestNameComparator()
           
ApplicationUserBestNameComparator(Locale locale)
           
 
Method Summary
 int compare(ApplicationUser user1, ApplicationUser user2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ApplicationUserBestNameComparator

public ApplicationUserBestNameComparator(Locale locale)

ApplicationUserBestNameComparator

public ApplicationUserBestNameComparator()
Method Detail

compare

public int compare(ApplicationUser user1,
                   ApplicationUser user2)
Specified by:
compare in interface Comparator<ApplicationUser>


Copyright © 2002-2014 Atlassian. All Rights Reserved.