public interface MutableStringStream extends StringStream
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
consumeRemaining()
Consumes the rest of the stream
|
void |
moveBackward()
Moves the cursor 1 step backward
|
void |
moveBackward(int by)
Moves the cursor by the given steps backward
|
void |
moveForward()
Moves the cursor 1 step forward
|
void |
moveForward(int by)
Moves the cursor by the given steps forward
|
char |
read()
Reads the next character, and moves the cursor forward.
|
java.lang.String |
read(int characters)
Reads the given number of characters, and moves the cursor forward.
|
boolean |
readBoolean()
Parses the next token as a
boolean. |
byte |
readByte()
Parses the next token as a
byte. |
double |
readDouble()
Parses the next token as a
double. |
float |
readFloat()
Parses the next token as a
float. |
int |
readInt()
Parses the next token as an
int. |
long |
readLong()
Parses the next token as a
long. |
short |
readShort()
Parses the next token as a
short. |
@NotNull java.lang.String |
readString()
Reads the next string.
|
@NotNull java.lang.String |
readUnquotedString()
Reads a single, unquoted string.
|
@NotNull java.lang.String |
readUntil(char delimiter)
Reads a string until it encounters the given delimiter character.
|
@NotNull java.lang.String |
readWhile(CharPredicate predicate)
Reads from the text stream until the given predicate returns
false. |
void |
setPosition(int position)
Sets the current position of the cursor
|
void |
skipToEnd()
Skips to the end of the stream
|
void |
skipWhitespace()
Skips all the upcoming whitespace
|
@NotNull @Unmodifiable StringStream |
toImmutableCopy()
Returns an
StringStream copy of this string stream |
@NotNull MutableStringStream |
toMutableCopy()
Returns a new, mutable
MutableStringStream copy of this stream. |
canRead, create, create, createMutable, createMutable, hasFinished, hasRemaining, isEmpty, isMutable, peek, peek, peekOffset, peekRemaining, peekString, peekUnquotedString, position, remaining, source, totalSizechar read()
java.lang.String read(int characters)
void moveForward()
void skipWhitespace()
void moveBackward()
void moveForward(int by)
by - Steps to movevoid moveBackward(int by)
by - Steps to move@NotNull @NotNull java.lang.String consumeRemaining()
void skipToEnd()
@NotNull @NotNull java.lang.String readUnquotedString()
@NotNull @NotNull java.lang.String readString()
@NotNull @NotNull java.lang.String readUntil(char delimiter)
delimiter
or before another backslash.delimiter - Delimiter character@NotNull @NotNull java.lang.String readWhile(CharPredicate predicate)
false.predicate - Predicate to test withfloat readFloat()
float.float.double readDouble()
double.double.int readInt()
int.int.long readLong()
long.long.short readShort()
short.short.byte readByte()
byte.byte.boolean readBoolean()
boolean.boolean.void setPosition(int position)
position - The cursor position@NotNull
@Contract(pure=true,
value="-> new")
@NotNull @Unmodifiable StringStream toImmutableCopy()
StringStream copy of this string streamtoImmutableCopy in interface StringStream@NotNull
@Contract(pure=true,
value="-> new")
@NotNull MutableStringStream toMutableCopy()
MutableStringStream copy of this stream.toMutableCopy in interface StringStream