Interface Instance.Destructor<I>

Type Parameters:
I - the contextual instance type
Enclosing class:
Instance<I>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Instance.Destructor<I>
An interface whose implementations can destroy contextual instances.

This is commonly implemented in terms of a method reference to the Factory.destroy(Object, Destruction) method.

Author:
Laird Nelson
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    destroy(I i, Destruction creation)
    Destroys the supplied contextual instance.
  • Method Details

    • destroy

      void destroy(I i, Destruction creation)
      Destroys the supplied contextual instance.
      Parameters:
      i - the contextual instance to destroy; may be null
      creation - the Destruction view of the Creation implementation that caused the contextual instance to be created; may be null