public class StringReader extends Object implements ImmutableStringReader
| Constructor and Description |
|---|
StringReader(String string) |
StringReader(StringReader other) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead() |
boolean |
canRead(int length) |
void |
expect(char c) |
int |
getCursor() |
String |
getRead() |
String |
getRemaining() |
int |
getRemainingLength() |
String |
getString() |
int |
getTotalLength() |
static boolean |
isAllowedInUnquotedString(char c) |
static boolean |
isAllowedNumber(char c) |
char |
peek() |
char |
peek(int offset) |
char |
read() |
boolean |
readBoolean() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
String |
readQuotedString() |
String |
readString() |
String |
readUnquotedString() |
void |
setCursor(int cursor) |
void |
skip() |
void |
skipWhitespace() |
public StringReader(StringReader other)
public StringReader(String string)
public String getString()
getString in interface ImmutableStringReaderpublic void setCursor(int cursor)
public int getRemainingLength()
getRemainingLength in interface ImmutableStringReaderpublic int getTotalLength()
getTotalLength in interface ImmutableStringReaderpublic int getCursor()
getCursor in interface ImmutableStringReaderpublic String getRead()
getRead in interface ImmutableStringReaderpublic String getRemaining()
getRemaining in interface ImmutableStringReaderpublic boolean canRead(int length)
canRead in interface ImmutableStringReaderpublic boolean canRead()
canRead in interface ImmutableStringReaderpublic char peek()
peek in interface ImmutableStringReaderpublic char peek(int offset)
peek in interface ImmutableStringReaderpublic char read()
public void skip()
public static boolean isAllowedNumber(char c)
public void skipWhitespace()
public int readInt()
throws CommandSyntaxException
CommandSyntaxExceptionpublic long readLong()
throws CommandSyntaxException
CommandSyntaxExceptionpublic double readDouble()
throws CommandSyntaxException
CommandSyntaxExceptionpublic float readFloat()
throws CommandSyntaxException
CommandSyntaxExceptionpublic static boolean isAllowedInUnquotedString(char c)
public String readUnquotedString()
public String readQuotedString() throws CommandSyntaxException
CommandSyntaxExceptionpublic String readString() throws CommandSyntaxException
CommandSyntaxExceptionpublic boolean readBoolean()
throws CommandSyntaxException
CommandSyntaxExceptionpublic void expect(char c)
throws CommandSyntaxException
CommandSyntaxExceptionCopyright © 2018. All rights reserved.