java.text.spi
Class BreakIteratorProvider

java.lang.Object
  extended by java.util.spi.LocaleServiceProvider
      extended by java.text.spi.BreakIteratorProvider

public abstract class BreakIteratorProvider
extends LocaleServiceProvider

A BreakIteratorProvider provides localized instances of BreakIterator.

Since:
1.6

Constructor Summary
protected BreakIteratorProvider()
          Constructs a new BreakIteratorProvider.
 
Method Summary
abstract  BreakIterator getCharacterInstance(Locale locale)
          Returns a BreakIterator instance for character breaks in the specified Locale.
abstract  BreakIterator getLineInstance(Locale locale)
          Returns a BreakIterator instance for line breaks in the specified Locale.
abstract  BreakIterator getSentenceInstance(Locale locale)
          Returns a BreakIterator instance for sentence breaks in the specified Locale.
abstract  BreakIterator getWordInstance(Locale locale)
          Returns a BreakIterator instance for word breaks in the specified Locale.
 
Methods inherited from class java.util.spi.LocaleServiceProvider
getAvailableLocales
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 BreakIterator instance for character breaks in the specified 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 LocaleServiceProvider.getAvailableLocales()
See Also:
BreakIterator.getCharacterInstance(java.util.Locale)

getLineInstance

public abstract BreakIterator getLineInstance(Locale locale)
Returns a BreakIterator instance for line breaks in the specified 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 LocaleServiceProvider.getAvailableLocales()
See Also:
BreakIterator.getLineInstance(java.util.Locale)

getSentenceInstance

public abstract BreakIterator getSentenceInstance(Locale locale)
Returns a BreakIterator instance for sentence breaks in the specified 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 LocaleServiceProvider.getAvailableLocales()
See Also:
BreakIterator.getSentenceInstance(java.util.Locale)

getWordInstance

public abstract BreakIterator getWordInstance(Locale locale)
Returns a BreakIterator instance for word breaks in the specified 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 LocaleServiceProvider.getAvailableLocales()
See Also:
BreakIterator.getWordInstance(java.util.Locale)