public class LineIterator<X> extends AbstractIterator<X>
Modifier and Type | Class and Description |
---|---|
static class |
LineIterator.LineIteratorFactory<X> |
Constructor and Description |
---|
LineIterator(Reader r) |
LineIterator(Reader r,
java.util.function.Function<String,X> op) |
Modifier and Type | Method and Description |
---|---|
static <X> IteratorFromReaderFactory<X> |
getFactory()
Returns a factory that vends LineIterators that read the contents of the
given Reader, splitting on newlines.
|
static <X> IteratorFromReaderFactory<X> |
getFactory(java.util.function.Function<String,X> op)
Returns a factory that vends LineIterators that read the contents of the
given Reader, splitting on newlines.
|
boolean |
hasNext() |
static void |
main(String[] args) |
X |
next() |
Object |
peek() |
remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public LineIterator(Reader r)
public LineIterator(Reader r, java.util.function.Function<String,X> op)
public boolean hasNext()
AbstractIterator
public X next()
AbstractIterator
public Object peek()
public static <X> IteratorFromReaderFactory<X> getFactory()
public static <X> IteratorFromReaderFactory<X> getFactory(java.util.function.Function<String,X> op)
op
- A function to be applied to each line before it is returnedpublic static void main(String[] args)