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 |
|---|---|
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.
|
iteratorpublic 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)Copyright © 2017. All Rights Reserved.