Package org.postgresql.pljava.internal
Class Checked.Closing<T,E extends Exception>
java.lang.Object
org.postgresql.pljava.internal.Checked.Closing<T,E>
- All Implemented Interfaces:
AutoCloseable
,Supplier<T>
,Checked.AutoCloseable<E>
public static class Checked.Closing<T,E extends Exception>
extends Object
implements Supplier<T>, Checked.AutoCloseable<E>
A class that can supply a
T
while also implementing
AutoCloseable<E>
; suitable for use in a
try
-with-resources to wrap some value that does not itself
implement AutoCloseable
.
Obtained via one of the closing
methods above.
-
Method Summary
-
Method Details
-
get
-
close
public void close() throws E- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChecked.AutoCloseable<T>
- Throws:
E
-