public class PushbackString extends Object
| Constructor and Description |
|---|
PushbackString(String input)
Constructs a new instance of PushbackString
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
int |
index()
Get the current index of the PushbackString.
|
static boolean |
isHexDigit(Character c)
Returns true if the parameter character is a hexidecimal digit 0 through 9, a through f, or A through F.
|
static boolean |
isOctalDigit(Character c)
Returns true if the parameter character is an octal digit 0 through 7.
|
void |
mark() |
Character |
next() |
Character |
nextHex() |
Character |
nextOctal() |
Character |
peek()
Return the next character without affecting the current index.
|
boolean |
peek(char c)
Test to see if the next character is a particular value without affecting the current index.
|
void |
pushback(Character c) |
protected String |
remainder() |
void |
reset() |
public PushbackString(String input)
input - the String to decodepublic void pushback(Character c)
c - The character to set as the pushbackpublic int index()
public boolean hasNext()
public Character next()
public Character nextHex()
public Character nextOctal()
public static boolean isHexDigit(Character c)
c - The Character to testpublic static boolean isOctalDigit(Character c)
c - The Character to testpublic Character peek()
public boolean peek(char c)
c - The character to test forpublic void mark()
public void reset()
protected String remainder()
Copyright © 2017. All rights reserved.