Class StringReader
java.lang.Object
de.placeblock.commandapi.core.parser.StringReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRead()booleancanRead(int length) booleanintgetRead()intintstatic booleanisAllowedNumber(char c) static booleanisQuotedStringStart(char c) charpeek()charpeek(int offset) charread()booleandoublefloatintreadInt()longreadLong()readStringUntil(char terminator) voidsetCursor(int cursor) voidskip()void
-
Constructor Details
-
StringReader
-
StringReader
-
-
Method Details
-
getString
-
setCursor
public void setCursor(int cursor) -
getRemainingLength
public int getRemainingLength() -
getTotalLength
public int getTotalLength() -
getCursor
public int getCursor() -
getRead
-
getRemaining
-
canRead
public boolean canRead(int length) -
canReadWord
public boolean canReadWord() -
canRead
public boolean canRead() -
peek
public char peek() -
peek
public char peek(int offset) -
read
public char read() -
skip
public void skip() -
isAllowedNumber
public static boolean isAllowedNumber(char c) -
isQuotedStringStart
public static boolean isQuotedStringStart(char c) -
skipWhitespace
public void skipWhitespace() -
readInt
- Throws:
CommandParseException
-
readLong
- Throws:
CommandParseException
-
readDouble
- Throws:
CommandParseException
-
readFloat
- Throws:
CommandParseException
-
readUnquotedString
-
readQuotedString
- Throws:
CommandParseException
-
readStringUntil
- Throws:
CommandParseException
-
readString
- Throws:
CommandParseException
-
readBoolean
- Throws:
CommandParseException
-
debugString
-