APIdia Launch Partner
Top Description Constructors Methods
java.text.spi

public abstract Class CollatorProvider

extends LocaleServiceProvider
Class Inheritance
Known Direct Subclasses
sun.util.locale.provider.CollatorProviderImpl, sun.util.locale.provider.SPILocaleProviderAdapter.CollatorProviderDelegate
Imports
java.text.Collator, java.util.Locale, java.util.spi.LocaleServiceProvider

An abstract class for service providers that provide concrete implementations of the Collator class.
Since
1.6

Constructor Summary

AccessConstructor and Description
protected
CollatorProvider()

Sole constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract Collator

Returns:

the Collator for the desired locale.
getInstance
(Locale
the desired locale.
locale
)

Returns a new Collator instance for the specified locale.

Inherited from java.util.spi.LocaleServiceProvider:
getAvailableLocalesisSupportedLocale

Constructor Detail

CollatorProviderback to summary
protected CollatorProvider()

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

getInstanceback to summary
public abstract Collator getInstance(Locale locale)

Returns a new Collator instance for the specified locale.

Parameters
locale:Locale

the desired locale.

Returns:Collator

the Collator for the desired locale.

Exceptions
NullPointerException:
if locale is null
IllegalArgumentException:
if locale isn't one of the locales returned from getAvailableLocales().
See Also
java.text.Collator#getInstance(java.util.Locale)