Interface StateCondition

All Superinterfaces:
Predicate<State>
All Known Implementing Classes:
IsAnyState, IsExecutable, IsForceable, IsHardResetable, IsNot, IsSaveable, IsSoftResetable, IsStoppable, StateConditions, StateMatch
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 StateCondition extends Predicate<State>
Something that is able to test the condition of a State.
Author:
rob
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(State state)
    Tests the condition of the state.
    default boolean
    test(StateEvent stateEvent)
    Helper to save type getState all the time.

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Method Details

    • test

      boolean test(State state)
      Tests the condition of the state.
      Specified by:
      test in interface Predicate<State>
      Parameters:
      state - The state.
      Returns:
      true if the state matches the condition, false otherwise.
    • test

      default boolean test(StateEvent stateEvent)
      Helper to save type getState all the time.
      Parameters:
      stateEvent - The event.
      Returns:
      depends on the event state