com.atlassian.jira.issue.comparator
Class UserBestNameComparator

java.lang.Object
  extended by com.atlassian.jira.issue.comparator.UserBestNameComparator
All Implemented Interfaces:
java.util.Comparator<com.opensymphony.user.User>

public class UserBestNameComparator
extends java.lang.Object
implements java.util.Comparator<com.opensymphony.user.User>

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:
v4.0

Constructor Summary
UserBestNameComparator(java.util.Locale locale)
           
 
Method Summary
 int compare(com.opensymphony.user.User user1, com.opensymphony.user.User 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

UserBestNameComparator

public UserBestNameComparator(java.util.Locale locale)
Method Detail

compare

public int compare(com.opensymphony.user.User user1,
                   com.opensymphony.user.User user2)
Specified by:
compare in interface java.util.Comparator<com.opensymphony.user.User>


Copyright © 2002-2010 Atlassian. All Rights Reserved.