Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2768)

Unified Diff: icu4j/main/classes/core/src/com/ibm/icu/text/UnhandledBreakEngine.java

Issue 330940043: RBBI, add caching, remove reverse rules. Base URL: svn+ssh://source.icu-project.org/repos/icu/trunk/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: icu4j/main/classes/core/src/com/ibm/icu/text/UnhandledBreakEngine.java
===================================================================
--- icu4j/main/classes/core/src/com/ibm/icu/text/UnhandledBreakEngine.java (revision 40432)
+++ icu4j/main/classes/core/src/com/ibm/icu/text/UnhandledBreakEngine.java (working copy)
@@ -50,20 +50,13 @@
@Override
public int findBreaks(CharacterIterator text, int startPos, int endPos,
- boolean reverse, int breakType, DictionaryBreakEngine.DequeI foundBreaks) {
+ int breakType, DictionaryBreakEngine.DequeI foundBreaks) {
if (breakType >= 0 && breakType < fHandled.length()) {
UnicodeSet uniset = fHandled.get(breakType);
int c = CharacterIteration.current32(text);
- if (reverse) {
- while (text.getIndex() > startPos && uniset.contains(c)) {
- CharacterIteration.previous32(text);
- c = CharacterIteration.current32(text);
- }
- } else {
- while (text.getIndex() < endPos && uniset.contains(c)) {
- CharacterIteration.next32(text);
- c = CharacterIteration.current32(text);
- }
+ while (text.getIndex() < endPos && uniset.contains(c)) {
+ CharacterIteration.next32(text);
+ c = CharacterIteration.current32(text);
}
}
return 0;

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b