Code example for BreakIterator

Methods: first, setText

0
 
	public DocSplitterFallbackImpl() 
	{ 
		buffer = "";
		bdry = BreakIterator.getSentenceInstance(Locale.US);
		bdry.setText("");
		start = bdry.first();
	} 
 
	public boolean operational() 
	{ 
		return true; 
	} 
 
	/** 
	 * Add more text to the buffer. 
	 * This allows this class to be used in FIFO mode: text is added with 
	 * this call, and sentences are extracted with the getNextSentence() call. 
	 */ 
	public void addText(String newText)
	{