public class WordIterator
extends java.text.BreakIterator
BreakIterator.getWordInstance()
Constructor and Description |
---|
WordIterator()
Creates a new instance of OmegaT's own word BreakIterator
|
Modifier and Type | Method and Description |
---|---|
int |
current()
Return character index of the text boundary that was most recently
returned by next(), previous(), first(), or last()
|
int |
first()
Return the first boundary.
|
int |
following(int offset)
Not yet implemented! Throws a RuntimeException if you try to call
it.
Return the first boundary following the specified offset.
|
java.text.CharacterIterator |
getText()
Not yet implemented! Throws a RuntimeException if you try to call
it.
Get the text being scanned
|
int |
last()
Not yet implemented! Throws a RuntimeException if you try to call
it.
Return the last boundary.
|
int |
next()
Return the boundary of the word following the current boundary.
|
int |
next(int n)
Not yet implemented! Throws a RuntimeException if you try to call
it.
Return the nth boundary from the current boundary
|
int |
previous()
Not yet implemented! Throws a RuntimeException if you try to call
it.
Return the boundary preceding the current boundary.
|
void |
setText(java.text.CharacterIterator newText)
Not yet implemented! Throws a RuntimeException if you try to call
it.
Set a new text for scanning.
|
void |
setText(java.lang.String newText)
Set a new text string to be scanned.
|
public WordIterator()
public void setText(java.lang.String newText)
setText
in class java.text.BreakIterator
newText
- new text to scan.public int first()
first
in class java.text.BreakIterator
public int current()
current
in class java.text.BreakIterator
public int next()
Note: This iterator skips OmegaT-specific tags, and groups [text-]mnemonics-text into a single token.
next
in class java.text.BreakIterator
public int next(int n)
next
in class java.text.BreakIterator
n
- which boundary to return. A value of 0 does nothing. Negative
values move to previous boundaries and positive values move to
later boundaries.public int following(int offset)
following
in class java.text.BreakIterator
offset
- the offset to begin scanning. Valid values are determined by
the CharacterIterator passed to setText(). Invalid values
cause an IllegalArgumentException to be thrown.public void setText(java.text.CharacterIterator newText)
setText
in class java.text.BreakIterator
newText
- new text to scan.public java.text.CharacterIterator getText()
getText
in class java.text.BreakIterator
public int previous()
previous
in class java.text.BreakIterator
public int last()
last
in class java.text.BreakIterator