Interface Factory<T>

Type Parameters:
T - the type of the value
All Superinterfaces:
AutoCloseable, Closeable, Reference<T>
All Known Implementing Classes:
ConcurrentLazyFactory, LazyFactory

public interface Factory<T> extends Reference<T>, Closeable
Creates and destroys a value.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disposes the Factory and the value.

    Methods inherited from interface io.github.cowwoc.pouch10.core.Reference

    getValue, isInitialized
  • Method Details

    • close

      void close()
      Disposes the Factory and the value. Subsequent invocations of this method have no effect. Invoking any other method after this one results in IllegalStateException being thrown.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable