Interface Function.Builder

Enclosing interface:
Function

public static interface Function.Builder
Builder for a function definition.
Since:
5.2.250908
  • Method Details

    • name

      @Contract("_ -> this") @NotNull @NotNull Function.Builder name(@NotNull @NotNull String name)
      Configures the name of the function.
      Parameters:
      name - The function name.
      Returns:
      This builder instance.
      Since:
      5.2.250908
    • description

      @Contract("_ -> this") @NotNull @NotNull Function.Builder description(@Nullable @Nullable String description)
      Configures description of what the function does, used by the model to choose when and how to call the function.
      Parameters:
      description - The function description.
      Returns:
      This builder instance.
      Since:
      5.2.250908
    • addParameter

      @Contract("_ -> this") @NotNull @NotNull Function.Builder addParameter(@NotNull @NotNull FunctionParameter parameter)
      Adds a new parameter to the function definition.
      Parameters:
      parameter - The function parameter to be added.
      Returns:
      This builder instance.
      Since:
      5.2.250908
    • create

      @NotNull @NotNull Function create()
      Creates a new function definition.
      Returns:
      The new function instance.
      Since:
      5.2.250908