Package com.ibm.icu.text
Class AnyTransliterator.ScriptRunIterator
- java.lang.Object
-
- com.ibm.icu.text.AnyTransliterator.ScriptRunIterator
-
- Enclosing class:
- AnyTransliterator
private static class AnyTransliterator.ScriptRunIterator extends java.lang.Object
Returns a series of ranges corresponding to scripts. They will be of the form: ccccSScSSccccTTcTcccc - c = common, S = first script, T = second | | - first run (start, limit) | | - second run (start, limit) That is, the runs will overlap. The reason for this is so that a transliterator can consider common characters both before and after the scripts.
-
-
Field Summary
Fields Modifier and Type Field Description int
limit
The end of the run, exclusive, valid after next() returns.int
scriptCode
The code of the current run, valid after next() returns.int
start
The start of the run, inclusive, valid after next() returns.private Replaceable
text
private int
textLimit
private int
textStart
-
Constructor Summary
Constructors Constructor Description ScriptRunIterator(Replaceable text, int start, int limit)
Constructs a run iterator over the given text from start (inclusive) to limit (exclusive).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adjustLimit(int delta)
Adjusts internal indices for a change in the limit index of the given delta.boolean
next()
Returns true if there are any more runs.
-
-
-
Field Detail
-
text
private Replaceable text
-
textStart
private int textStart
-
textLimit
private int textLimit
-
scriptCode
public int scriptCode
The code of the current run, valid after next() returns. May be UScript.INVALID_CODE if and only if the entire text is COMMON/INHERITED.
-
start
public int start
The start of the run, inclusive, valid after next() returns.
-
limit
public int limit
The end of the run, exclusive, valid after next() returns.
-
-
Constructor Detail
-
ScriptRunIterator
public ScriptRunIterator(Replaceable text, int start, int limit)
Constructs a run iterator over the given text from start (inclusive) to limit (exclusive).
-
-
Method Detail
-
next
public boolean next()
Returns true if there are any more runs. true is always returned at least once. Upon return, the caller should examine scriptCode, start, and limit.
-
adjustLimit
public void adjustLimit(int delta)
Adjusts internal indices for a change in the limit index of the given delta. A positive delta means the limit has increased.
-
-