public class CodePointMap.StringIterator extends Object
void onString(CodePointMap map, CharSequence s, int start) {
CodePointMap.StringIterator iter = map.stringIterator(s, start);
while (iter.next()) {
int end = iter.getIndex(); // code point from between start and end
useValue(s, start, end, iter.getCodePoint(), iter.getValue());
start = end;
}
}
This class is not intended for public subclassing.
| Modifier and Type | Field and Description |
|---|---|
protected int |
c
Deprecated.
This API is ICU internal only.
|
protected CharSequence |
s
Deprecated.
This API is ICU internal only.
|
protected int |
sIndex
Deprecated.
This API is ICU internal only.
|
protected int |
value
Deprecated.
This API is ICU internal only.
|
| Modifier | Constructor and Description |
|---|---|
protected |
StringIterator(CharSequence s,
int sIndex)
Deprecated.
This API is ICU internal only.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCodePoint() |
int |
getIndex() |
int |
getValue() |
boolean |
next()
Reads the next code point, post-increments the string index,
and gets a value from the map.
|
boolean |
previous()
Reads the previous code point, pre-decrements the string index,
and gets a value from the map.
|
void |
reset(CharSequence s,
int sIndex)
Resets the iterator to a new string and/or a new string index.
|
@Deprecated protected CharSequence s
@Deprecated protected int sIndex
@Deprecated protected int c
@Deprecated protected int value
@Deprecated protected StringIterator(CharSequence s, int sIndex)
public void reset(CharSequence s, int sIndex)
s - string to iterate oversIndex - string index where the iteration will startpublic boolean next()
public boolean previous()
public final int getIndex()
public final int getCodePoint()
public final int getValue()
Copyright © 2016 Unicode, Inc. and others.