Interface JoinConfiguration.Builder
- All Superinterfaces:
AbstractBuilder<JoinConfiguration>
- Enclosing interface:
JoinConfiguration
A builder for join configurations.
- Since:
- 4.9.0
-
Method Summary
Modifier and TypeMethodDescriptionconvertor(Function<ComponentLike, Component> convertor) Sets the convertor of this join configuration builder.lastSeparator(@Nullable ComponentLike lastSeparator) Sets the last separator of this join configuration 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.parentStyle(Style parentStyle) Sets the style of the parent component that contains the joined components.predicate(Predicate<ComponentLike> predicate) Sets the predicate of this join configuration builder.prefix(@Nullable ComponentLike prefix) Sets the prefix of this join configuration builder.separator(@Nullable ComponentLike separator) Sets the separator of this join configuration builder.suffix(@Nullable ComponentLike suffix) Sets the suffix of this join configuration builder.Methods inherited from interface AbstractBuilder
build
-
Method Details
-
prefix
Sets the prefix of this join configuration builder.- Parameters:
prefix- the prefix- Returns:
- this builder
- Since:
- 4.9.0
-
suffix
Sets the suffix of this join configuration builder.- Parameters:
suffix- the suffix- Returns:
- this builder
- Since:
- 4.9.0
-
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
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
Sets the style of the parent component that contains the joined components.- Parameters:
parentStyle- the style- Returns:
- this builder
- Since:
- 4.11.0
-