Package org.reactfx

Interface Guard

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
BiGuard, CloseableOnceGuard, MultiGuard
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 Guard extends AutoCloseable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Guard
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases this guard.
    default Guard
     
    static Guard
     
    static Guard
    multi(Guard... guards)
    Returns a guard that is a composition of multiple guards.
  • Field Details

    • EMPTY_GUARD

      static final Guard EMPTY_GUARD
  • Method Details

    • close

      void close()
      Releases this guard. Does not throw.
      Specified by:
      close in interface AutoCloseable
    • closeableOnce

      default Guard closeableOnce()
    • closeableOnce

      static Guard closeableOnce(Guard guard)
    • multi

      static Guard multi(Guard... guards)
      Returns a guard that is a composition of multiple guards. Its close() method closes the guards in reverse order.
      Parameters:
      guards - guards that should be released (in reverse order) when the returned guards is released.