java.text.spi

Class CollatorProvider

public abstract class CollatorProvider extends LocaleServiceProvider

A {@link CollatorProvider} provides localized instances of {@link java.text.Collator}.

Since: 1.6

Constructor Summary
protected CollatorProvider()
Constructs a new {@link CollatorProvider}.
Method Summary
abstract CollatorgetInstance(Locale locale)
Returns a {@link java.text.Collator} instance for the specified {@link java.util.Locale}.

Constructor Detail

CollatorProvider

protected CollatorProvider()
Constructs a new {@link CollatorProvider}. Provided for implicit invocation by subclasses.

Method Detail

getInstance

public abstract Collator getInstance(Locale locale)
Returns a {@link java.text.Collator} instance for the specified {@link java.util.Locale}.

Parameters: locale the desired locale.

Returns: the localized instance.

Throws: NullPointerException if the locale is null. IllegalArgumentException if the locale is not one returned by {@link getAvailableLocales()}

See Also: getInstance