public class IteratorInput extends AbstractInput
Iterator
returning lines.Constructor and Description |
---|
IteratorInput(Iterator<? extends Line> lines)
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.
|
iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public IteratorInput(Iterator<? extends Line> lines)
buffer
is NOT cloned, meaning that changes to the
buffer will also be reflected in this input device and vice versa.lines
- the buffer to use as basis for this input devicepublic boolean hasMoreLines()
Input
public Line readLine()
Input
public void close()
Copyright © 2024. All rights reserved.