Interface DisposableSupplier<T>
-
- Type Parameters:
T- type which is created byDisposableSupplier.
- All Superinterfaces:
Supplier<T>
public interface DisposableSupplier<T> extends Supplier<T>
Supplier extension which is able to callSupplier.get()method to create a new object and also calldispose(Object)to make some cleaning code regarding the instance and the specificSupplierinstance.- Author:
- Petr Bouda
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose(T instance)This method will dispose the provided object created by thisSupplier.
-
-
-
Method Detail
-
dispose
void dispose(T instance)
This method will dispose the provided object created by thisSupplier.- Parameters:
instance- the instance to be disposed.
-
-