Package com.ibm.icu.text
Class AnyTransliterator.ScriptRunIterator
java.lang.Object
com.ibm.icu.text.AnyTransliterator.ScriptRunIterator
- Enclosing class:
AnyTransliterator
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
FieldsModifier and TypeFieldDescriptionint
The end of the run, exclusive, valid after next() returns.int
The code of the current run, valid after next() returns.int
The start of the run, inclusive, valid after next() returns.private Replaceable
private int
private int
-
Constructor Summary
ConstructorsConstructorDescriptionScriptRunIterator
(Replaceable text, int start, int limit) Constructs a run iterator over the given text from start (inclusive) to limit (exclusive). -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
text
-
textStart
private int textStart -
textLimit
private int textLimit -
scriptCode
public int scriptCodeThe 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 startThe start of the run, inclusive, valid after next() returns. -
limit
public int limitThe end of the run, exclusive, valid after next() returns.
-
-
Constructor Details
-
ScriptRunIterator
Constructs a run iterator over the given text from start (inclusive) to limit (exclusive).
-
-
Method Details
-
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.
-