Package org.apache.wiki.util.comparators
Class LocaleComparator
- java.lang.Object
-
- org.apache.wiki.util.comparators.CollatorComparator
-
- org.apache.wiki.util.comparators.LocaleComparator
-
- All Implemented Interfaces:
java.util.Comparator<java.lang.String>
public class LocaleComparator extends CollatorComparator
A comparator that sorts Strings using the locale's collator.
-
-
Field Summary
-
Fields inherited from class org.apache.wiki.util.comparators.CollatorComparator
DEFAULT_LOCALE_COMPARATOR, m_collator
-
-
Constructor Summary
Constructors Constructor Description LocaleComparator()
Default constructor uses the current locale's collator.LocaleComparator(java.util.Locale locale)
use a specific locale's collator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setLocale(java.util.Locale locale)
Specify a new locale.-
Methods inherited from class org.apache.wiki.util.comparators.CollatorComparator
compare, setCollator
-
-
-
-
Constructor Detail
-
LocaleComparator
public LocaleComparator()
Default constructor uses the current locale's collator.
-
LocaleComparator
public LocaleComparator(java.util.Locale locale)
use a specific locale's collator.
-
-
Method Detail
-
setLocale
public void setLocale(java.util.Locale locale)
Specify a new locale.- Parameters:
locale
- the locale for future comparisons
-
-