Interface JoinConfiguration.Builder

All Superinterfaces:
AbstractBuilder<JoinConfiguration>
Enclosing interface:
JoinConfiguration

public static sealed interface JoinConfiguration.Builder extends AbstractBuilder<JoinConfiguration>
A builder for join configurations.
Since:
4.9.0
  • Method Details

    • prefix

      @Contract("_ -> this") JoinConfiguration.Builder prefix(@Nullable ComponentLike prefix)
      Sets the prefix of this join configuration builder.
      Parameters:
      prefix - the prefix
      Returns:
      this builder
      Since:
      4.9.0
    • suffix

      @Contract("_ -> this") JoinConfiguration.Builder suffix(@Nullable ComponentLike suffix)
      Sets the suffix of this join configuration builder.
      Parameters:
      suffix - the suffix
      Returns:
      this builder
      Since:
      4.9.0
    • separator

      @Contract("_ -> this") JoinConfiguration.Builder separator(@Nullable ComponentLike separator)
      Sets the separator of this join configuration builder.
      Parameters:
      separator - the separator
      Returns:
      this builder
      Since:
      4.9.0
    • lastSeparator

      @Contract("_ -> this") JoinConfiguration.Builder lastSeparator(@Nullable ComponentLike lastSeparator)
      Sets the last separator of this join configuration builder.
      Parameters:
      lastSeparator - the last separator
      Returns:
      this builder
      Since:
      4.9.0
    • lastSeparatorIfSerial

      @Contract("_ -> this") JoinConfiguration.Builder lastSeparatorIfSerial(@Nullable ComponentLike lastSeparatorIfSerial)
      Sets the last separator that will be used instead of the normal last separator in the case where there are more than two components being joined.

      This can be used to mimic a serial (or Oxford) comma.

      Parameters:
      lastSeparatorIfSerial - the last separator
      Returns:
      this builder
      Since:
      4.9.0
    • convertor

      @Contract("_ -> this") JoinConfiguration.Builder convertor(Function<ComponentLike, Component> convertor)
      Sets the convertor of this join configuration builder.

      This is used to mutate the components that are going to be joined. It does not touch the prefix, suffix or any of the separators.

      Parameters:
      convertor - the convertor
      Returns:
      this builder
      Since:
      4.9.0
    • predicate

      @Contract("_ -> this") JoinConfiguration.Builder predicate(Predicate<ComponentLike> predicate)
      Sets the predicate of this join configuration builder.

      This is used to determine if a component is to be included in the join process. It does not touch the prefix, suffix or any of the separators.

      Parameters:
      predicate - the predicate
      Returns:
      this builder
      Since:
      4.9.0
    • parentStyle

      @Contract("_ -> this") JoinConfiguration.Builder parentStyle(Style parentStyle)
      Sets the style of the parent component that contains the joined components.
      Parameters:
      parentStyle - the style
      Returns:
      this builder
      Since:
      4.11.0