Interface Resource

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
ResourceIterable<T>, ResourceIterator<T>, Result

public interface Resource extends AutoCloseable
Resource that should be closed when not needed anymore. Extends AutoCloseable with close() not throwing any checked exception.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Resource
    Empty resource that doesn't close anything.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
  • Field Details

    • EMPTY

      static final Resource EMPTY
      Empty resource that doesn't close anything.
  • Method Details

    • close

      void close()