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:
  `Comparator<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(Locale locale)`
use a specific locale's collator.

## Method Summary

Modifier and Type
Method
Description
`void`
`setLocale(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 Details

### LocaleComparator

public LocaleComparator()
Default constructor uses the current locale's collator.

### LocaleComparator

public LocaleComparator(Locale locale)
use a specific locale's collator.

## Method Details

### setLocale

public void setLocale(Locale locale)
Specify a new locale.

Parameters:
  `locale` - the locale for future comparisons