T
- type which is created by DisposableSupplier
.public interface DisposableSupplier<T> extends Supplier<T>
Supplier.get()
method to create a new object and also call dispose(Object)
to make some cleaning code regarding the instance and the specific Supplier
instance.Modifier and Type | Method and Description |
---|---|
void |
dispose(T instance)
This method will dispose the provided object created by this
Supplier . |
void dispose(T instance)
Supplier
.instance
- the instance to be disposed.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.