public int Current() { if (transitions.Any()) { return(transitions.First()); } return(wordBreaker.Current()); }
/// <summary> /// return true if there is a token from the buffer, or null if it is /// exhausted. /// </summary> private bool IncrementSentence() { if (length == 0) // we must refill the buffer { return(false); } while (true) { int start = iterator.Current(); if (start == BreakIterator.DONE) { return(false); // BreakIterator exhausted } // find the next set of boundaries int end_Renamed = iterator.next(); if (end_Renamed == BreakIterator.DONE) { return(false); // BreakIterator exhausted } setNextSentence(start, end_Renamed); if (incrementWord()) { return(true); } } }