Input
Represents a position in an input stream with elements of type E and wrapped values of type W.
The Input trait provides methods to access the current element, check for end of input, advance to the next position, and collect elements or wrapped values between positions.
Type parameters
- E
-
the type of elements in the input stream
- W
-
the type of wrapped values associated with elements
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class StringInput
Members list
Value members
Abstract methods
Returns the element at the current position.
Returns the element at the current position.
Attributes
- Returns
-
the current element
Indicates whether the current position is at the end of input.
Indicates whether the current position is at the end of input.
Attributes
- Returns
-
true if at end of input, false otherwise
Tests equality between Input positions.
Tests equality between Input positions.
Value parameters
- obj
-
the object to compare with
Attributes
- Returns
-
true if the positions are equal, false otherwise
Returns a new Input representing the position after the current one.
Returns a new Input representing the position after the current one.
Attributes
- Returns
-
the next position in the input stream
Returns the previous Input representing the position before the current one.
Returns the previous Input representing the position before the current one.
Attributes
- Returns
-
the previous position in the input stream
Returns the wrapped value associated with the current element.
Returns the wrapped value associated with the current element.
Attributes
- Returns
-
the wrapped value for the current element
Concrete 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
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
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
Returns a string representation of this input position.
Returns a string representation of this input position.
Attributes
- Returns
-
a string representing the next few elements from this position
- Definition Classes
-
Any