Package java.text.spi
Class CollatorProvider
java.lang.Object
java.util.spi.LocaleServiceProvider
java.text.spi.CollatorProvider
public abstract class CollatorProvider extends LocaleServiceProvider
This abstract class should be extended by service providers which provide
instances of
Collator.
Note that Android does not support user-supplied locale service providers.
- Since:
- 1.6
-
Constructor Summary
Constructors Modifier Constructor Description protectedCollatorProvider()Default constructor, for use by subclasses. -
Method Summary
Modifier and Type Method Description abstract CollatorgetInstance(Locale locale)Returns an instance ofCollatorfor the given locale.Methods inherited from class java.util.spi.LocaleServiceProvider
getAvailableLocales
-
Constructor Details
-
CollatorProvider
protected CollatorProvider()Default constructor, for use by subclasses.
-
-
Method Details
-
getInstance
Returns an instance ofCollatorfor the given locale.- Parameters:
locale- the locale- Returns:
- an instance of
Collator - Throws:
NullPointerException- iflocale == nullIllegalArgumentException- if locale isn't one of the locales returned from getAvailableLocales().
-