Interface DisposableSupplier<T>

  • Type Parameters:
    T - type which is created by DisposableSupplier.
    All Superinterfaces:
    Supplier<T>

    public interface DisposableSupplier<T>
    extends Supplier<T>
    Supplier extension which is able to call 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.
    Author:
    Petr Bouda
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dispose​(T instance)
      This method will dispose the provided object created by this Supplier.
      • Methods inherited from interface java.util.function.Supplier

        get
    • Method Detail

      • dispose

        void dispose​(T instance)
        This method will dispose the provided object created by this Supplier.
        Parameters:
        instance - the instance to be disposed.