Package org.ojalgo.type.function
Class ManagedSupplier<T>
- java.lang.Object
-
- org.ojalgo.type.function.ManagedSupplier<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Iterable<T>
,java.util.function.Supplier<T>
,AutoFunctional
,AutoSupplier<T>
final class ManagedSupplier<T> extends java.lang.Object implements AutoSupplier<T>
-
-
Field Summary
Fields Modifier and Type Field Description private Throughput
myManager
private java.util.function.Supplier<T>
mySupplier
-
Constructor Summary
Constructors Constructor Description ManagedSupplier(Throughput manager, java.util.function.Supplier<T> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
T
read()
-
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
-
-
-
-
Field Detail
-
myManager
private final Throughput myManager
-
mySupplier
private final java.util.function.Supplier<T> mySupplier
-
-
Constructor Detail
-
ManagedSupplier
ManagedSupplier(Throughput manager, java.util.function.Supplier<T> supplier)
-
-
Method Detail
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceAutoSupplier<T>
- Throws:
java.lang.Exception
-
read
public T read()
- Specified by:
read
in interfaceAutoSupplier<T>
-
-