Class SequencedReader<S,T>
java.lang.Object
org.ojalgo.netio.SequencedReader<S,T>
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<T>, FromFileReader<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface FromFileReader
FromFileReader.Builder<F> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FromFileReader<T> private final Function<S, ? extends FromFileReader<T>> private final BlockingQueue<S> -
Constructor Summary
ConstructorsConstructorDescriptionSequencedReader(BlockingQueue<S> sources, Function<S, ? extends FromFileReader<T>> factory) Create anthat will supply items from the containers, one after the other, until all containers are empty.invalid reference
AutoSupplier -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FromFileReader
drainTo, forEachInBacthes, iterator, map, streamMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
myCurrent
-
myFactory
-
mySources
-
-
Constructor Details
-
SequencedReader
SequencedReader(BlockingQueue<S> sources, Function<S, ? extends FromFileReader<T>> factory) Create anthat will supply items from the containers, one after the other, until all containers are empty. You can create multiple such suppliers sharing the same queue of containers.invalid reference
AutoSupplier
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFromFileReader<S>- Throws:
IOException
-
read
Description copied from interface:FromFileReaderReturning null indicates that there are no more items to read. That's the same behaviour asBufferedReader.readLine(). All implementations must return null precisely once.- Specified by:
readin interfaceFromFileReader<S>
-
nextSupplier
private void nextSupplier()
-