Class AScopedSupplier<T>
- java.lang.Object
-
- com.g2forge.alexandria.java.function.AScopedSupplier<T>
-
- All Implemented Interfaces:
ICloseable
,IFunctional
,IRunnable
,IScopedSupplier<T>
,ISupplier<T>
,IThrowRunnable<RuntimeException>
,Closeable
,AutoCloseable
,Runnable
,Supplier<T>
public abstract class AScopedSupplier<T> extends Object implements IScopedSupplier<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AScopedSupplier.State
-
Field Summary
Fields Modifier and Type Field Description protected AScopedSupplier.State
state
-
Constructor Summary
Constructors Constructor Description AScopedSupplier()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
cleanup()
void
close()
protected abstract T
compute()
T
get()
protected T
getValue()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.g2forge.alexandria.java.function.ISupplier
run, toFunction, wrap
-
-
-
-
Field Detail
-
state
protected AScopedSupplier.State state
-
-
Method Detail
-
cleanup
protected abstract void cleanup()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceICloseable
-
compute
protected abstract T compute()
-
getValue
protected T getValue()
-
-