class CharIndexedString extends Object implements CharIndexed, Serializable
Modifier and Type | Field and Description |
---|---|
private int |
anchor |
private int |
len |
private String |
s |
OUT_OF_BOUNDS
Constructor and Description |
---|
CharIndexedString(String str,
int index) |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index)
Returns the character at the given offset past the current cursor
position in the input.
|
boolean |
isValid()
Returns true if the most recent move() operation placed the cursor
position at a valid position in the input.
|
boolean |
move(int index)
Shifts the input buffer by a given number of positions.
|
CharIndexedString(String str, int index)
public char charAt(int index)
CharIndexed
charAt
in interface CharIndexed
index
- the offset position in the character field to examinepublic boolean isValid()
CharIndexed
isValid
in interface CharIndexed
public boolean move(int index)
CharIndexed
move
in interface CharIndexed
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses