public class StringCharCursor extends CharCursor
Constructor and Description |
---|
StringCharCursor(java.lang.CharSequence string) |
StringCharCursor(java.lang.CharSequence string,
int offset) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
char |
current() |
int |
getBeginIndex() |
int |
getEndIndex() |
int |
getIndex()
returns the current location of the cursor
|
void |
init(java.lang.CharSequence string) |
char |
next()
reads a character from the cursor
|
char |
previous()
reads a character from the cursor
|
char |
setIndex(int pos)
sets the cursor to the position
|
char |
skip(int n)
Skips the next n characters
|
first, last, prev, read, regionMatches, regionMatchesIgnoreCase, subseq, subseq
public StringCharCursor(java.lang.CharSequence string)
public StringCharCursor(java.lang.CharSequence string, int offset)
public int getIndex()
getIndex
in interface java.text.CharacterIterator
getIndex
in class CharCursor
public int getBeginIndex()
getBeginIndex
in interface java.text.CharacterIterator
getBeginIndex
in class CharCursor
public int getEndIndex()
getEndIndex
in interface java.text.CharacterIterator
getEndIndex
in class CharCursor
public char setIndex(int pos)
setIndex
in interface java.text.CharacterIterator
setIndex
in class CharCursor
public char next()
next
in interface java.text.CharacterIterator
next
in class CharCursor
public char previous()
previous
in interface java.text.CharacterIterator
previous
in class CharCursor
public char current()
current
in interface java.text.CharacterIterator
current
in class CharCursor
public char skip(int n)
skip
in class CharCursor
public void init(java.lang.CharSequence string)
public java.lang.Object clone()
clone
in interface java.text.CharacterIterator
clone
in class CharCursor