public class SimpleFilteredSentenceBreakIterator extends BreakIterator
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleFilteredSentenceBreakIterator.Builder |
DONE, KIND_CHARACTER, KIND_LINE, KIND_SENTENCE, KIND_WORD, WORD_IDEO, WORD_IDEO_LIMIT, WORD_KANA, WORD_KANA_LIMIT, WORD_LETTER, WORD_LETTER_LIMIT, WORD_NONE, WORD_NONE_LIMIT, WORD_NUMBER, WORD_NUMBER_LIMIT| Constructor and Description |
|---|
SimpleFilteredSentenceBreakIterator(BreakIterator adoptBreakIterator,
CharsTrie forwardsPartialTrie,
CharsTrie backwardsTrie) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clone method.
|
int |
current()
Return the iterator's current position.
|
boolean |
equals(Object obj) |
int |
first()
Set the iterator to the first boundary position.
|
int |
following(int offset)
Sets the iterator's current iteration position to be the first
boundary position following the specified position.
|
CharacterIterator |
getText()
Returns a CharacterIterator over the text being analyzed.
|
int |
hashCode() |
boolean |
isBoundary(int offset)
Return true if the specified position is a boundary position.
|
int |
last()
Set the iterator to the last boundary position.
|
int |
next()
Advances the iterator forward one boundary.
|
int |
next(int n)
Move the iterator by the specified number of steps in the text.
|
int |
preceding(int offset)
Sets the iterator's current iteration position to be the last
boundary position preceding the specified position.
|
int |
previous()
Move the iterator backward one boundary.
|
void |
setText(CharacterIterator newText)
Sets the iterator to analyze a new piece of text.
|
getAvailableLocales, getAvailableULocales, getCharacterInstance, getCharacterInstance, getCharacterInstance, getLineInstance, getLineInstance, getLineInstance, getLocale, getRuleStatus, getRuleStatusVec, getSentenceInstance, getSentenceInstance, getSentenceInstance, getWordInstance, getWordInstance, getWordInstance, registerInstance, registerInstance, setText, setText, unregisterpublic SimpleFilteredSentenceBreakIterator(BreakIterator adoptBreakIterator, CharsTrie forwardsPartialTrie, CharsTrie backwardsTrie)
adoptBreakIterator - break iterator to adoptforwardsPartialTrie - forward & partial char trie to adoptbackwardsTrie - backward trie to adoptpublic Object clone()
BreakIteratorclone in class BreakIteratorpublic int first()
BreakIteratorfirst in class BreakIteratorpublic int preceding(int offset)
BreakIteratorpreceding in class BreakIteratoroffset - The character position to start searching from.public int previous()
BreakIteratorprevious in class BreakIteratorpublic int current()
BreakIteratorcurrent in class BreakIteratorpublic boolean isBoundary(int offset)
BreakIteratorisBoundary in class BreakIteratoroffset - the offset to check.public int next()
BreakIteratornext in class BreakIteratorpublic int next(int n)
BreakIteratornext in class BreakIteratorn - The number of boundaries to advance over (if positive, moves
forward; if negative, moves backwards).public int following(int offset)
BreakIteratorfollowing in class BreakIteratoroffset - The character position to start searching from.public int last()
BreakIteratorlast in class BreakIteratorpublic CharacterIterator getText()
BreakIteratorCaution:The state of the returned CharacterIterator must not be modified in any way while the BreakIterator is still in use. Doing so will lead to undefined behavior of the BreakIterator. Clone the returned CharacterIterator first and work with that.
The returned CharacterIterator is a reference to the actual iterator being used by the BreakIterator. No guarantees are made about the current position of this iterator when it is returned; it may differ from the BreakIterators current position. If you need to move that position to examine the text, clone this function's return value first.
getText in class BreakIteratorpublic void setText(CharacterIterator newText)
BreakIteratorCaution: The supplied CharacterIterator is used directly by the BreakIterator, and must not be altered in any way by code outside of the BreakIterator. Doing so will lead to undefined behavior of the BreakIterator.
setText in class BreakIteratornewText - A CharacterIterator referring to the text
to analyze with this BreakIterator (the iterator's current
position is ignored, but its other state is significant).