bee

bee

Task.ValuedTaskReference<T, R>

  • T

    The type of the Task interface containing the referenced command.

  • R

    The type of the value returned by the referenced command.

Represents a type-safe reference to a task command that returns a value, typically implemented using a method reference (e.g., MyTask::getBuildResult).

This functional interface serves as a marker and must be Serializable.

It extends Function to indicate that it accepts a task instance and produces a result. It also extends TaskReference for consistency.

accept(Ttask)void

Ttask

The task instance on which to execute the command.

Provides a default implementation for the Consumer#accept(Object) method inherited via TaskReference. It simply calls the Function#apply(Object) method, effectively executing the valued task command but discarding its return value.