T - the type to recycleE - the exception type that may be thrown when a recyclable item is acquired.public class RecycleOnClose<T,E extends java.lang.Exception>
extends java.lang.Object
implements java.lang.AutoCloseable
Recycler.acquireRecycleOnClose() in a try-with-resources statement, so that when the try block exits, the
acquired instance is recycled.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Recycle an instance.
|
T |
get()
Get the object instance.
|
public T get()
public void close()
Resettable.reset() if the instance implements Resettable.close in interface java.lang.AutoCloseable