Package xyz.cofe.text
Class LazyLineReader
- java.lang.Object
-
- xyz.cofe.text.LazyLineReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Iterable<java.lang.String>
public class LazyLineReader extends java.lang.Object implements java.lang.Iterable<java.lang.String>, java.io.CloseableОтложенный /ленивый построчный итератор- Author:
- nt.gocha@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description protected intbufferSizeprotected java.util.function.Supplier<java.io.Reader>lazyReaderprotected java.util.concurrent.locks.Locklock
-
Constructor Summary
Constructors Constructor Description LazyLineReader(java.util.function.Supplier<java.io.Reader> reader)LazyLineReader(java.util.function.Supplier<java.io.Reader> reader, int bufferSize, java.util.concurrent.locks.Lock lock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.util.Iterator<java.lang.String>iterator()
-
-
-
Method Detail
-
iterator
public java.util.Iterator<java.lang.String> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.String>
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-