public class BufferedInput extends AbstractInput
LinkedList line buffer.| Constructor and Description |
|---|
BufferedInput(LinkedList<Line> buffer)
Constructor with linked list used as source of the input lines.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Performs a no-op as there are no underlying resources
|
boolean |
hasMoreLines()
Returns true if there are more lines to be read.
|
Line |
readLine()
Reads the next line.
|
String |
toMultiLineString()
Returns a multi-line representation of the lines in this buffer.
|
String |
toString()
Returns a list-like representation of the lines contained in this buffer.
|
iteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic BufferedInput(LinkedList<Line> buffer)
buffer is NOT cloned, meaning that changes to the
buffer will also be reflected in this input device and vice versa.buffer - the buffer to use as basis for this input devicepublic boolean hasMoreLines()
Inputpublic Line readLine()
Inputpublic String toString()
toMultiLineString() instead.public String toMultiLineString()
LineUtil.toMultiLineString(List)public void close()
Copyright © 2025. All rights reserved.