Interface TerminableConsumer

All Known Subinterfaces:
CompositeTerminable
All Known Implementing Classes:
AbstractCompositeTerminable, AbstractWeakCompositeTerminable, BasePlugin
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 interface TerminableConsumer
Accepts AutoCloseables (and by inheritance Terminables), as well as TerminableModules.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends AutoCloseable>
    T
    bind(T terminable)
    Binds with the given terminable.
    default <T extends TerminableModule>
    T
    bindModule(T module)
    Binds with the given terminable module.
  • Method Details

    • bind

      @NotNull <T extends AutoCloseable> T bind(@NotNull T terminable)
      Binds with the given terminable.
      Type Parameters:
      T - the terminable type
      Parameters:
      terminable - the terminable to bind with
      Returns:
      the same terminable
    • bindModule

      @NotNull default <T extends TerminableModule> T bindModule(@NotNull T module)
      Binds with the given terminable module.
      Type Parameters:
      T - the module type
      Parameters:
      module - the module to bind with
      Returns:
      the same module