Package org.ojalgo.netio
Class TextLineReader
java.lang.Object
org.ojalgo.netio.TextLineReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<String>
,Supplier<String>
,FromFileReader<String>
,AutoFunctional
,AutoSupplier<String>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.ojalgo.netio.FromFileReader
FromFileReader.Builder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static boolean
not null, not empty, not blank and not a comment (starts with '#')static TextLineReader
static TextLineReader
of
(File file, OperatorWithException<InputStream> filter) static TextLineReader
of
(InMemoryFile file) static TextLineReader
of
(InMemoryFile file, OperatorWithException<InputStream> filter) read()
<T> AutoSupplier
<T> withFilteredParser
(Predicate<String> filter, TextLineReader.Parser<T> parser) The filter could for instance beisLineOK(String)
<T> AutoSupplier
<T> withFilteredParser
(TextLineReader.Parser<T> parser) The filter isisLineOK(String)
<T> AutoSupplier
<T> withParser
(TextLineReader.Parser<T> parser) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ojalgo.type.function.AutoSupplier
drainTo, get, iterator, processAll
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
myReader
-
-
Constructor Details
-
TextLineReader
-
TextLineReader
TextLineReader(Reader delegate)
-
-
Method Details
-
isLineOK
not null, not empty, not blank and not a comment (starts with '#') -
of
-
of
-
of
-
of
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceAutoSupplier<String>
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceFromFileReader<String>
- Throws:
IOException
-
read
- Specified by:
read
in interfaceAutoSupplier<String>
-
withFilteredParser
The filter isisLineOK(String)
-
withFilteredParser
public <T> AutoSupplier<T> withFilteredParser(Predicate<String> filter, TextLineReader.Parser<T> parser) The filter could for instance beisLineOK(String)
-
withParser
-