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
`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
`void` `setLocale​(java.util.Locale locale)` Specify a new locale.

### Methods inherited from class org.apache.wiki.util.comparators.CollatorComparator

`compare, setCollator`

### 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

### 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