ICU-13447 RBBI: getRuleStatus() behavior, incorporate review comments, clarifying comments and API description.
X-SVN-Rev: 41024
This commit is contained in:
parent
c2bb9c7523
commit
c589ea8b5d
@ -478,6 +478,9 @@ public:
|
||||
* position from <code>next()</code>, <code>previous()</code>, or
|
||||
* any other break iterator functions that returns a boundary position.
|
||||
* <p>
|
||||
* Note that <code>getRuleStatus()</code> returns the value corresponding to
|
||||
* <code>current()</code> index even after <code>next()</code> has returned DONE.
|
||||
* <p>
|
||||
* When creating custom break rules, one is free to define whatever
|
||||
* status values may be convenient for the application.
|
||||
* <p>
|
||||
|
@ -4519,6 +4519,9 @@ void RBBITest::TestTableRedundancies() {
|
||||
}
|
||||
}
|
||||
|
||||
// Bug 13447: verify that getRuleStatus() returns the value corresponding to current(),
|
||||
// even after next() has returned DONE.
|
||||
|
||||
void RBBITest::TestBug13447() {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
LocalPointer<RuleBasedBreakIterator> bi(
|
||||
|
@ -529,7 +529,7 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current iteration position. Note that UBRK_DONE is never
|
||||
* Returns the current iteration position. Note that DONE is never
|
||||
* returned from this function; if iteration has run to the end of a
|
||||
* string, current() will return the length of the string while
|
||||
* next() will return BreakIterator.DONE).
|
||||
@ -558,6 +558,10 @@ public class RuleBasedBreakIterator extends BreakIterator {
|
||||
* position from <code>next()</code>, <code>previous()</code>, or
|
||||
* any other break iterator functions that returns a boundary position.
|
||||
* <p>
|
||||
* Note that <code>getRuleStatus()</code> returns the value corresponding to
|
||||
* <code>current()</code> index even after <code>next()</code> has returned DONE.
|
||||
* <p>
|
||||
|
||||
* @return the status from the break rule that determined the boundary
|
||||
* at the current iteration position.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user