org.opencms.workplace.list
Class CmsListItemCaseInsensitiveComparator

java.lang.Object
  extended by org.opencms.workplace.list.CmsListItemCaseInsensitiveComparator
All Implemented Interfaces:
I_CmsListItemComparator

public class CmsListItemCaseInsensitiveComparator
extends java.lang.Object
implements I_CmsListItemComparator

Comparator for case insensitive column sorting with string localization.

If both list items column values are Strings then a localized collector is used for sorting; if not, the Comparable interface is used.

Since:
6.0.0
Version:
$Revision: 1.11 $
Author:
Michael Moossen
See Also:
CmsListColumnDefinition

Constructor Summary
CmsListItemCaseInsensitiveComparator()
          Default Constructor.
 
Method Summary
 java.util.Comparator getComparator(java.lang.String columnId, java.util.Locale locale)
          Returns a new comparator for comparing list items by the given column, and using the given locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsListItemCaseInsensitiveComparator

public CmsListItemCaseInsensitiveComparator()
Default Constructor.

Method Detail

getComparator

public java.util.Comparator getComparator(java.lang.String columnId,
                                          java.util.Locale locale)
Description copied from interface: I_CmsListItemComparator
Returns a new comparator for comparing list items by the given column, and using the given locale.

Specified by:
getComparator in interface I_CmsListItemComparator
Parameters:
columnId - the id of the column to sort by
locale - the current used locale
Returns:
a new comparator
See Also:
I_CmsListItemComparator.getComparator(java.lang.String, java.util.Locale)