Package io.hektor.fsm

Interface Guard<E,C extends Context,D extends Data>

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<E,C extends Context,D extends Data>
A specialized Predicate that accepts three arguments. The event itself, the FSM Context and the Data object in case you need to make decisions on more than just the event.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(E event, C context, D data)
    Evaluates this predicate on the given arguments.
  • Method Details

    • test

      boolean test(E event, C context, D data)
      Evaluates this predicate on the given arguments.
      Parameters:
      event - the incoming event that triggers this guard associated with a particular FSM.
      context - the Context associated with the FSM for which this Guard is associated with.
      data - the Data bag associated with the FSM for which this Guard is associated with.
      Returns:
      true if the input arguments matches the predicate, otherwise false