StringInput
An implementation of the Input trait for string inputs.
StringInput provides a character-based input implementation where each position represents a character in a string. The wrapped value is the same as the element (the character itself).
Value parameters
- idx
-
the current position in the string (0-based index)
- prev
-
the previous StringInput position, if any
- s
-
the string to process
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Returns the character at the current position.
Returns the character at the current position.
Attributes
- Returns
-
the current character
Checks if the current position is at the end of input.
Checks if the current position is at the end of input.
Attributes
- Returns
-
true if the position is beyond the end of the string
Returns a new StringInput at the next position.
Returns a new StringInput at the next position.
Attributes
- Returns
-
a new StringInput with index incremented by 1
Returns the wrapped value, which is the same as the character for StringInput.
Returns the wrapped value, which is the same as the character for StringInput.
Attributes
- Returns
-
the current character
Inherited methods
Collects all elements between the current position and a specified end position.
Collects all elements between the current position and a specified end position.
Value parameters
- end
-
the ending position (exclusive)
Attributes
- Returns
-
a list of elements between current position and end
- Throws
-
RuntimeException
if end of input is reached before the end position
- Inherited from:
- Input
Collects all wrapped values between the current position and a specified end position.
Collects all wrapped values between the current position and a specified end position.
Value parameters
- end
-
the ending position (exclusive)
Attributes
- Returns
-
a list of wrapped values between current position and end
- Throws
-
RuntimeException
if end of input is reached before the end position
- Inherited from:
- Input
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Collects all elements from the current position to the end of input.
Collects all elements from the current position to the end of input.
Attributes
- Returns
-
a list of all remaining elements
- Inherited from:
- Input