Package java.text.spi
Class BreakIteratorProvider
java.lang.Object
java.util.spi.LocaleServiceProvider
java.text.spi.BreakIteratorProvider
public abstract class BreakIteratorProvider extends LocaleServiceProvider
This abstract class should be extended by service providers that provide
instances of
BreakIterator.
Note that Android does not support user-supplied locale service providers.
- Since:
- 1.6
-
Constructor Summary
Constructors Modifier Constructor Description protectedBreakIteratorProvider()Default constructor, for use by subclasses. -
Method Summary
Modifier and Type Method Description abstract BreakIteratorgetCharacterInstance(Locale locale)Returns an instance ofBreakIteratorfor character breaks in the given locale.abstract BreakIteratorgetLineInstance(Locale locale)Returns an instance ofBreakIteratorfor line breaks in the given locale.abstract BreakIteratorgetSentenceInstance(Locale locale)Returns an instance ofBreakIteratorfor sentence breaks in the given locale.abstract BreakIteratorgetWordInstance(Locale locale)Returns an instance ofBreakIteratorfor word breaks in the given locale.Methods inherited from class java.util.spi.LocaleServiceProvider
getAvailableLocales
-
Constructor Details
-
BreakIteratorProvider
protected BreakIteratorProvider()Default constructor, for use by subclasses.
-
-
Method Details
-
getWordInstance
Returns an instance ofBreakIteratorfor word breaks in the given locale.- Parameters:
locale- the locale- Returns:
- an instance of
BreakIterator - Throws:
NullPointerException- iflocale == nullIllegalArgumentException- if locale isn't one of the locales returned from getAvailableLocales().
-
getLineInstance
Returns an instance ofBreakIteratorfor line breaks in the given locale.- Parameters:
locale- the locale- Returns:
- an instance of
BreakIterator - Throws:
NullPointerException- iflocale == nullIllegalArgumentException- if locale isn't one of the locales returned from getAvailableLocales().
-
getCharacterInstance
Returns an instance ofBreakIteratorfor character breaks in the given locale.- Parameters:
locale- the locale- Returns:
- an instance of
BreakIterator - Throws:
NullPointerException- iflocale == nullIllegalArgumentException- if locale isn't one of the locales returned from getAvailableLocales().
-
getSentenceInstance
Returns an instance ofBreakIteratorfor sentence breaks in the given locale.- Parameters:
locale- the locale- Returns:
- an instance of
BreakIterator - Throws:
NullPointerException- iflocale == nullIllegalArgumentException- if locale isn't one of the locales returned from getAvailableLocales().
-