KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > text > spi > BreakIteratorProvider


1 /*
2  * @(#)BreakIteratorProvider.java 1.2 05/11/17
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.text.spi;
9
10 import java.text.BreakIterator JavaDoc;
11 import java.util.Locale JavaDoc;
12 import java.util.spi.LocaleServiceProvider;
13
14 /**
15  * An abstract class for service providers that
16  * provide concrete implementations of the
17  * {@link java.text.BreakIterator BreakIterator} class.
18  *
19  * @since 1.6
20  * @version @(#)BreakIteratorProvider.java 1.2 05/11/17
21  */

22 public abstract class BreakIteratorProvider extends LocaleServiceProvider {
23
24     /**
25      * Sole constructor. (For invocation by subclass constructors, typically
26      * implicit.)
27      */

28     protected BreakIteratorProvider() {
29     }
30
31     /**
32      * Returns a new <code>BreakIterator</code> instance
33      * for <a HREF="../BreakIterator.html#word">word breaks</a>
34      * for the given locale.
35      * @param locale the desired locale
36      * @return A break iterator for word breaks
37      * @exception NullPointerException if <code>locale</code> is null
38      * @exception IllegalArgumentException if <code>locale</code> isn't
39      * one of the locales returned from
40      * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
41      * getAvailableLocales()}.
42      * @see java.text.BreakIterator#getWordInstance(java.util.Locale)
43      */

44     public abstract BreakIterator JavaDoc getWordInstance(Locale JavaDoc locale);
45
46     /**
47      * Returns a new <code>BreakIterator</code> instance
48      * for <a HREF="../BreakIterator.html#line">line breaks</a>
49      * for the given locale.
50      * @param locale the desired locale
51      * @return A break iterator for line breaks
52      * @exception NullPointerException if <code>locale</code> is null
53      * @exception IllegalArgumentException if <code>locale</code> isn't
54      * one of the locales returned from
55      * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
56      * getAvailableLocales()}.
57      * @see java.text.BreakIterator#getLineInstance(java.util.Locale)
58      */

59     public abstract BreakIterator JavaDoc getLineInstance(Locale JavaDoc locale);
60
61     /**
62      * Returns a new <code>BreakIterator</code> instance
63      * for <a HREF="../BreakIterator.html#character">character breaks</a>
64      * for the given locale.
65      * @param locale the desired locale
66      * @return A break iterator for character breaks
67      * @exception NullPointerException if <code>locale</code> is null
68      * @exception IllegalArgumentException if <code>locale</code> isn't
69      * one of the locales returned from
70      * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
71      * getAvailableLocales()}.
72      * @see java.text.BreakIterator#getCharacterInstance(java.util.Locale)
73      */

74     public abstract BreakIterator JavaDoc getCharacterInstance(Locale JavaDoc locale);
75
76     /**
77      * Returns a new <code>BreakIterator</code> instance
78      * for <a HREF="../BreakIterator.html#sentence">sentence breaks</a>
79      * for the given locale.
80      * @param locale the desired locale
81      * @return A break iterator for sentence breaks
82      * @exception NullPointerException if <code>locale</code> is null
83      * @exception IllegalArgumentException if <code>locale</code> isn't
84      * one of the locales returned from
85      * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
86      * getAvailableLocales()}.
87      * @see java.text.BreakIterator#getSentenceInstance(java.util.Locale)
88      */

89     public abstract BreakIterator JavaDoc getSentenceInstance(Locale JavaDoc locale);
90 }
91
Popular Tags