|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.text.normalizer.RuleCharacterIterator
public class RuleCharacterIterator
An iterator that returns 32-bit code points. This class is deliberately not related to any of the JDK or ICU4J character iterator classes in order to minimize complexity.
| Field Summary | |
|---|---|
static int |
DONE
Value returned when there are no more characters to iterate. |
static int |
PARSE_ESCAPES
Bitmask option to enable parsing of escape sequences. |
static int |
PARSE_VARIABLES
Bitmask option to enable parsing of variable names. |
static int |
SKIP_WHITESPACE
Bitmask option to enable skipping of whitespace. |
| Constructor Summary | |
|---|---|
RuleCharacterIterator(String text,
SymbolTable sym,
ParsePosition pos)
Constructs an iterator over the given text, starting at the given position. |
|
| Method Summary | |
|---|---|
boolean |
atEnd()
Returns true if this iterator has no more characters to return. |
Object |
getPos(Object p)
Returns an object which, when later passed to setPos(), will restore this iterator's position. |
boolean |
inVariable()
Returns true if this iterator is currently within a variable expansion. |
boolean |
isEscaped()
Returns true if the last character returned by next() was escaped. |
void |
jumpahead(int count)
Advances the position by the given number of 16-bit code units. |
String |
lookahead()
Returns a string containing the remainder of the characters to be returned by this iterator, without any option processing. |
int |
next(int options)
Returns the next character using the given options, or DONE if there are no more characters, and advance the position to the next character. |
void |
setPos(Object p)
Restores this iterator to the position it had when getPos() returned the given object. |
void |
skipIgnored(int options)
Skips ahead past any ignored characters, as indicated by the given options. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DONE
public static final int PARSE_VARIABLES
public static final int PARSE_ESCAPES
public static final int SKIP_WHITESPACE
| Constructor Detail |
|---|
public RuleCharacterIterator(String text,
SymbolTable sym,
ParsePosition pos)
text - the text to be iteratedsym - the symbol table, or null if there is none. If sym is null,
then variables will not be deferenced, even if the PARSE_VARIABLES
option is set.pos - upon input, the index of the next character to return. If a
variable has been dereferenced, then pos will not increment as
characters of the variable value are iterated.| Method Detail |
|---|
public boolean atEnd()
public int next(int options)
options - one or more of the following options, bitwise-OR-ed
together: PARSE_VARIABLES, PARSE_ESCAPES, SKIP_WHITESPACE.
public boolean isEscaped()
public boolean inVariable()
public Object getPos(Object p)
p - a position object previously returned by getPos(),
or null. If not null, it will be updated and returned. If
null, a new position object will be allocated and returned.
public void setPos(Object p)
p - a position object previously returned by getPos()public void skipIgnored(int options)
options - one or more of the following options, bitwise-OR-ed
together: PARSE_VARIABLES, PARSE_ESCAPES, SKIP_WHITESPACE.public String lookahead()
public void jumpahead(int count)
count - the number of 16-bit code units to jump over
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||