Interface AutoCloser.Closer<T,E extends Exception>

Type Parameters:
T - the Java type of the object being closed
E - the Java type of the exception that can be thrown when closing
Enclosing class:
AutoCloser<T,E extends Exception>
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 AutoCloser.Closer<T,E extends Exception>
A callback interface representing a close operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(T object)
    This method is called to auto-close the resource.
  • Method Details

    • close

      void close(@NonNull T object) throws E
      This method is called to auto-close the resource.
      Parameters:
      object - the resource to auto-close
      Throws:
      E - the exception type that can be thrown when closing