114 |
* This methdod returns the offset of the text element boundary following |
* This methdod returns the offset of the text element boundary following |
115 |
* the specified offset. |
* the specified offset. |
116 |
* |
* |
117 |
* @param offset The text index from which to find the next text boundary. |
* @param pos The text index from which to find the next text boundary. |
118 |
* |
* |
119 |
* @param The next text boundary following the specified index. |
* @return The next text boundary following the specified index. |
120 |
*/ |
*/ |
121 |
public abstract int following (int pos); |
public abstract int following (int pos); |
122 |
|
|
186 |
* |
* |
187 |
* @return A <code>BreakIterator</code> instance for the default locale. |
* @return A <code>BreakIterator</code> instance for the default locale. |
188 |
*/ |
*/ |
189 |
public static BreakIterator getCharacterInstance (Locale loc) |
public static BreakIterator getCharacterInstance (Locale locale) |
190 |
{ |
{ |
191 |
BreakIterator r = getInstance ("CharacterIterator", loc); |
BreakIterator r = getInstance ("CharacterIterator", locale); |
192 |
if (r == null) |
if (r == null) |
193 |
r = new gnu.java.text.CharacterBreakIterator (); |
r = new gnu.java.text.CharacterBreakIterator (); |
194 |
return r; |
return r; |
214 |
* |
* |
215 |
* @return A <code>BreakIterator</code> instance for the default locale. |
* @return A <code>BreakIterator</code> instance for the default locale. |
216 |
*/ |
*/ |
217 |
public static BreakIterator getLineInstance (Locale loc) |
public static BreakIterator getLineInstance (Locale locale) |
218 |
{ |
{ |
219 |
BreakIterator r = getInstance ("LineIterator", loc); |
BreakIterator r = getInstance ("LineIterator", locale); |
220 |
if (r == null) |
if (r == null) |
221 |
r = new gnu.java.text.LineBreakIterator (); |
r = new gnu.java.text.LineBreakIterator (); |
222 |
return r; |
return r; |
242 |
* |
* |
243 |
* @return A <code>BreakIterator</code> instance for the default locale. |
* @return A <code>BreakIterator</code> instance for the default locale. |
244 |
*/ |
*/ |
245 |
public static BreakIterator getSentenceInstance (Locale loc) |
public static BreakIterator getSentenceInstance (Locale locale) |
246 |
{ |
{ |
247 |
BreakIterator r = getInstance ("SentenceIterator", loc); |
BreakIterator r = getInstance ("SentenceIterator", locale); |
248 |
if (r == null) |
if (r == null) |
249 |
r = new gnu.java.text.SentenceBreakIterator (); |
r = new gnu.java.text.SentenceBreakIterator (); |
250 |
return r; |
return r; |
254 |
* This method returns the text this object is iterating over as a |
* This method returns the text this object is iterating over as a |
255 |
* <code>CharacterIterator</code>. |
* <code>CharacterIterator</code>. |
256 |
* |
* |
257 |
* @param The text being iterated over. |
* @return The text being iterated over. |
258 |
*/ |
*/ |
259 |
public abstract CharacterIterator getText (); |
public abstract CharacterIterator getText (); |
260 |
|
|
278 |
* |
* |
279 |
* @return A <code>BreakIterator</code> instance for the default locale. |
* @return A <code>BreakIterator</code> instance for the default locale. |
280 |
*/ |
*/ |
281 |
public static BreakIterator getWordInstance (Locale loc) |
public static BreakIterator getWordInstance (Locale locale) |
282 |
{ |
{ |
283 |
BreakIterator r = getInstance ("WordIterator", loc); |
BreakIterator r = getInstance ("WordIterator", locale); |
284 |
if (r == null) |
if (r == null) |
285 |
r = new gnu.java.text.WordBreakIterator (); |
r = new gnu.java.text.WordBreakIterator (); |
286 |
return r; |
return r; |
290 |
* This method tests whether or not the specified position is a text |
* This method tests whether or not the specified position is a text |
291 |
* element boundary. |
* element boundary. |
292 |
* |
* |
293 |
* @param offset The text position to test. |
* @param pos The text position to test. |
294 |
* |
* |
295 |
* @return <code>true</code> if the position is a boundary, |
* @return <code>true</code> if the position is a boundary, |
296 |
* <code>false</code> otherwise. |
* <code>false</code> otherwise. |
332 |
* This methdod returns the offset of the text element boundary preceding |
* This methdod returns the offset of the text element boundary preceding |
333 |
* the specified offset. |
* the specified offset. |
334 |
* |
* |
335 |
* @param offset The text index from which to find the preceding |
* @param pos The text index from which to find the preceding text boundary. |
|
* text boundary. |
|
336 |
* |
* |
337 |
* @returns The next text boundary preceding the specified index. |
* @returns The next text boundary preceding the specified index. |
338 |
*/ |
*/ |
356 |
/** |
/** |
357 |
* This method sets the text string to iterate over. |
* This method sets the text string to iterate over. |
358 |
* |
* |
359 |
* @param str The <code>String</code> to iterate over. |
* @param newText The <code>String</code> to iterate over. |
360 |
*/ |
*/ |
361 |
public void setText (String newText) |
public void setText (String newText) |
362 |
{ |
{ |
367 |
* This method sets the text to iterate over from the specified |
* This method sets the text to iterate over from the specified |
368 |
* <code>CharacterIterator</code>. |
* <code>CharacterIterator</code>. |
369 |
* |
* |
370 |
* @param ci The desired <code>CharacterIterator</code>. |
* @param newText The desired <code>CharacterIterator</code>. |
371 |
*/ |
*/ |
372 |
public abstract void setText (CharacterIterator newText); |
public abstract void setText (CharacterIterator newText); |
373 |
} |
} |