java.text.spi

Class BreakIteratorProvider

public abstract class BreakIteratorProvider extends LocaleServiceProvider

A BreakIteratorProvider provides localized instances of java.text.BreakIterator.

Since: 1.6

Constructor Summary
protected BreakIteratorProvider()
Constructs a new BreakIteratorProvider.
Method Summary
abstract BreakIteratorgetCharacterInstance(Locale locale)
Returns a java.text.BreakIterator instance for character breaks in the specified java.util.Locale.
abstract BreakIteratorgetLineInstance(Locale locale)
Returns a java.text.BreakIterator instance for line breaks in the specified java.util.Locale.
abstract BreakIteratorgetSentenceInstance(Locale locale)
Returns a java.text.BreakIterator instance for sentence breaks in the specified java.util.Locale.
abstract BreakIteratorgetWordInstance(Locale locale)
Returns a java.text.BreakIterator instance for word breaks in the specified java.util.Locale.

Constructor Detail

BreakIteratorProvider

protected BreakIteratorProvider()
Constructs a new BreakIteratorProvider. Provided for implicit invocation by subclasses.

Method Detail

getCharacterInstance

public abstract BreakIterator getCharacterInstance(Locale locale)
Returns a java.text.BreakIterator instance for character breaks in the specified java.util.Locale.

Parameters: locale the desired locale.

Returns: the localized instance for character breaks.

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

See Also: java.text.BreakIterator#getCharacterInstance(java.util.Locale)

getLineInstance

public abstract BreakIterator getLineInstance(Locale locale)
Returns a java.text.BreakIterator instance for line breaks in the specified java.util.Locale.

Parameters: locale the desired locale.

Returns: the localized instance for line breaks.

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

See Also: java.text.BreakIterator#getLineInstance(java.util.Locale)

getSentenceInstance

public abstract BreakIterator getSentenceInstance(Locale locale)
Returns a java.text.BreakIterator instance for sentence breaks in the specified java.util.Locale.

Parameters: locale the desired locale.

Returns: the localized instance for sentence breaks.

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

See Also: java.text.BreakIterator#getSentenceInstance(java.util.Locale)

getWordInstance

public abstract BreakIterator getWordInstance(Locale locale)
Returns a java.text.BreakIterator instance for word breaks in the specified java.util.Locale.

Parameters: locale the desired locale.

Returns: the localized instance for word breaks.

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

See Also: java.text.BreakIterator#getWordInstance(java.util.Locale)