Interface ContextAction

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 ContextAction
An action on the execution context.
  • Method Details

    • perform

      void perform(PsyContext oContext) throws PsyErrorException
      Performs this action on the specified execution context.
      Parameters:
      oContext - the execution context.
      Throws:
      PsyErrorException - when an error occurs.
    • ofConsumer

      static <T extends PsyObject> ContextAction ofConsumer(ContextAction.Consumer<T> consumer)
      Returns the context action created from the consumer.
      Type Parameters:
      T - the type of the input to the consumer.
      Parameters:
      consumer - the consumer.
      Returns:
      the context action created from the consumer
    • ofSupplier

      static ContextAction ofSupplier(ContextAction.Supplier supplier)
      Returns the context action created from the supplier.
      Parameters:
      supplier - the supplier.
      Returns:
      the context action created from the supplier
    • ofBiConsumer

      static <T1 extends PsyObject, T2 extends PsyObject> ContextAction ofBiConsumer(ContextAction.BiConsumer<T1,T2> biConsumer)
      Returns the context action created from the bi-consumer.
      Type Parameters:
      T1 - the type of the first input to the bi-consumer.
      T2 - the type of the second input to the bi-consumer.
      Parameters:
      biConsumer - the bi-consumer.
      Returns:
      the context action created from the bi-consumer
    • ofTriConsumer

      static <T1 extends PsyObject, T2 extends PsyObject, T3 extends PsyObject> ContextAction ofTriConsumer(ContextAction.TriConsumer<T1,T2,T3> triConsumer)
      Returns the context action created from the tri-consumer.
      Type Parameters:
      T1 - the type of the first input to the tri-consumer.
      T2 - the type of the second input to the tri-consumer.
      T3 - the type of the third input to the tri-consumer.
      Parameters:
      triConsumer - the tri-consumer.
      Returns:
      the context action created from the tri-consumer
    • ofFunction

      static <T extends PsyObject> ContextAction ofFunction(ContextAction.Function<T> function)
      Returns the context action created from the function.
      Type Parameters:
      T - the type of the input to the function.
      Parameters:
      function - the function.
      Returns:
      the context action created from the function
    • ofOptionalFunction

      static <T extends PsyObject> ContextAction ofOptionalFunction(ContextAction.OptionalFunction<T> optionalFunction)
      Returns the context action created from the function.
      Type Parameters:
      T - the type of the input to the optional function.
      Parameters:
      optionalFunction - the optional function.
      Returns:
      the context action created from the function
    • ofBiFunction

      static <T1 extends PsyObject, T2 extends PsyObject> ContextAction ofBiFunction(ContextAction.BiFunction<T1,T2> biFunction)
      Returns the context action created from the bi-function.
      Type Parameters:
      T1 - the type of the first input to the bi-function.
      T2 - the type of the second input to the bi-function.
      Parameters:
      biFunction - the bi-function.
      Returns:
      the context action created from the bi-function
    • ofTriFunction

      static <T1 extends PsyObject, T2 extends PsyObject, T3 extends PsyObject> ContextAction ofTriFunction(ContextAction.TriFunction<T1,T2,T3> triFunction)
      Returns the context action created from the tri-function.
      Type Parameters:
      T1 - the type of the first input to the tri-function.
      T2 - the type of the second input to the tri-function.
      T3 - the type of the third input to the tri-function.
      Parameters:
      triFunction - the tri-function.
      Returns:
      the context action created from the tri-function