Interface BiAction<T>

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 BiAction<T>
A function that is executed when an interaction occurs in a gui. Takes an additional parameter as the input.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    act(Window window, T input)
    Executes the bi-action.
    static <T> BiAction<T>
    from(Action action)
    Returns a BiAction that wraps the given Action.
    default BiAction<T>
    then(Action next)
    Returns a BiAction that executes this bi-action and then the given action.
    default BiAction<T>
    then(BiAction<T> next)
    Returns a BiAction that executes this bi-action and then the given bi-action.
  • Method Details

    • from

      static <T> BiAction<T> from(Action action)
      Returns a BiAction that wraps the given Action.
      Parameters:
      action - the action
      Returns:
      the bi-action
    • act

      void act(Window window, T input)
      Executes the bi-action.
      Parameters:
      window - the window
      input - the input
    • then

      default BiAction<T> then(BiAction<T> next)
      Returns a BiAction that executes this bi-action and then the given bi-action.
      Parameters:
      next - the next bi-action
      Returns:
      the bi-action
    • then

      default BiAction<T> then(Action next)
      Returns a BiAction that executes this bi-action and then the given action.
      Parameters:
      next - the next action
      Returns:
      the bi-action