public class ICU4JBreakIteratorSentenceSplitterIterator extends java.lang.Object implements SentenceSplitterIterator
Modifier and Type | Field and Description |
---|---|
protected int |
end
End of current sentence.
|
protected com.ibm.icu.text.BreakIterator |
sentenceExtractor
BreakIterator used to iterate over sentences.
|
protected int |
start
Start of current sentence.
|
protected java.lang.String |
text
Text to break up.
|
Constructor and Description |
---|
ICU4JBreakIteratorSentenceSplitterIterator()
Create sentence iterator.
|
ICU4JBreakIteratorSentenceSplitterIterator(java.util.Locale locale)
Create sentence iterator with specified locale.
|
ICU4JBreakIteratorSentenceSplitterIterator(java.lang.String text)
Create sentence iterator over text.
|
ICU4JBreakIteratorSentenceSplitterIterator(java.lang.String text,
java.util.Locale locale)
Create sentence iterator over text with specified locale.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Check if there is another sentence available.
|
java.lang.String |
next()
Return next sentence.
|
java.lang.String |
peek()
Return next sentence without advancing sentence pointer.
|
void |
setText(java.lang.String text)
Set the text to split.
|
protected com.ibm.icu.text.BreakIterator sentenceExtractor
protected int start
protected int end
protected java.lang.String text
public ICU4JBreakIteratorSentenceSplitterIterator()
public ICU4JBreakIteratorSentenceSplitterIterator(java.util.Locale locale)
locale
- The locale.public ICU4JBreakIteratorSentenceSplitterIterator(java.lang.String text)
text
- The text from which to extract sentences.public ICU4JBreakIteratorSentenceSplitterIterator(java.lang.String text, java.util.Locale locale)
text
- The text from which to extract sentences.locale
- The locale.public void setText(java.lang.String text)
setText
in interface SentenceSplitterIterator
text
- Text to split.public boolean hasNext()
hasNext
in interface SentenceSplitterIterator
public java.lang.String next()
next
in interface SentenceSplitterIterator
public java.lang.String peek()
peek
in interface SentenceSplitterIterator