public interface CharRepeater
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNextChar()
Returns true if it there are characters available to be consumed
from the input, otherwise false.
|
boolean |
isNextChar(char wanted)
Returns true if it the next character is the same as wanted,
otherwise false.
|
boolean |
isNextString(java.lang.String wanted)
Returns true if it the next sequence of characters matches the string wanted,
otherwise false.
|
char |
nextChar()
Returns the next character from the input, consuming it from the input.
|
char |
nextChar(char value_if_needed)
Returns the next character from the input, consuming it from the input.
|
char |
peekChar()
Returns the next character from the input, but does not consume it.
|
char |
peekChar(char value_if_needed)
Returns the next character from the input, but does not consume it.
|
void |
pushChar(char value)
Pushes a character onto the front of the input.
|
void |
skipChar()
Discards the next character from the input.
|
boolean hasNextChar()
boolean isNextChar(char wanted)
wanted - the character that we are looking forboolean isNextString(java.lang.String wanted)
wanted - the sequence of characters that we are looking forchar nextChar()
char nextChar(char value_if_needed)
value_if_needed - default returned if the input is exhausted.void pushChar(char value)
value - the character to be pushed backchar peekChar()
char peekChar(char value_if_needed)
value_if_needed - default returned if the input is exhausted.void skipChar()