Package net.kyori.adventure.text
Interface JoinConfiguration.Builder
-
- All Superinterfaces:
AbstractBuilder<JoinConfiguration>
,Buildable.Builder<JoinConfiguration>
- Enclosing interface:
- JoinConfiguration
public static interface JoinConfiguration.Builder extends AbstractBuilder<JoinConfiguration>, Buildable.Builder<JoinConfiguration>
A builder for join configurations.- Since:
- 4.9.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull JoinConfiguration.Builder
convertor(@NotNull Function<ComponentLike,Component> convertor)
Sets the convertor of this join configuration builder.@NotNull JoinConfiguration.Builder
lastSeparator(@Nullable ComponentLike lastSeparator)
Sets the last separator of this join configuration builder.@NotNull 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.@NotNull JoinConfiguration.Builder
predicate(@NotNull Predicate<ComponentLike> predicate)
Gets the predicate of this join configuration builder.@NotNull JoinConfiguration.Builder
prefix(@Nullable ComponentLike prefix)
Sets the prefix of this join configuration builder.@NotNull JoinConfiguration.Builder
separator(@Nullable ComponentLike separator)
Sets the separator of this join configuration builder.@NotNull JoinConfiguration.Builder
suffix(@Nullable ComponentLike suffix)
Sets the suffix of this join configuration builder.-
Methods inherited from interface net.kyori.adventure.util.Buildable.Builder
build
-
-
-
-
Method Detail
-
prefix
@Contract("_ -> this") @NotNull @NotNull JoinConfiguration.Builder prefix(@Nullable @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") @NotNull @NotNull JoinConfiguration.Builder suffix(@Nullable @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") @NotNull @NotNull JoinConfiguration.Builder separator(@Nullable @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") @NotNull @NotNull JoinConfiguration.Builder lastSeparator(@Nullable @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") @NotNull @NotNull JoinConfiguration.Builder lastSeparatorIfSerial(@Nullable @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") @NotNull @NotNull JoinConfiguration.Builder convertor(@NotNull @NotNull 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") @NotNull @NotNull JoinConfiguration.Builder predicate(@NotNull @NotNull Predicate<ComponentLike> predicate)
Gets 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
-
-