Interface VariableValueParameters.TextBuilder
- All Superinterfaces:
AbstractBuilder<ValueParameter<Component>>,Builder<ValueParameter<Component>,,VariableValueParameters.TextBuilder> ResettableBuilder<ValueParameter<Component>,VariableValueParameters.TextBuilder>
- Enclosing class:
VariableValueParameters
public static interface VariableValueParameters.TextBuilder
extends Builder<ValueParameter<Component>,VariableValueParameters.TextBuilder>
A builder that creates a parameter that serializes strings into
Component.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Tests for validity and creates thisValueParameter.consumeAllArguments(boolean allArguments) Sets whether the parameter will use all the arguments left in the chain, or whether it will just consume one.serializer(ComponentSerializer<Component, ? extends Component, String> serializer) Sets theComponentSerializerfor use by the element.serializerSupplier(Supplier<ComponentSerializer<Component, ? extends Component, String>> serializerSupplier) Sets theComponentSerializerfor use by the element, though the use of aSupplier.
-
Method Details
-
serializer
VariableValueParameters.TextBuilder serializer(ComponentSerializer<Component, ? extends Component, String> serializer) Sets theComponentSerializerfor use by the element.Setting this will replace any
ComponentSerializers orSuppliers that has already been set on this builder.- Parameters:
serializer- AComponentSerializer- Returns:
- This builder, for chaining
-
serializerSupplier
VariableValueParameters.TextBuilder serializerSupplier(Supplier<ComponentSerializer<Component, ? extends Component, String>> serializerSupplier) Sets theComponentSerializerfor use by the element, though the use of aSupplier.Setting this will replace any
ComponentSerializers orSuppliers that has already been set on this builder.- Parameters:
serializerSupplier- ASupplierthat will supply aComponentSerializer- Returns:
- This builder, for chaining
-
consumeAllArguments
Sets whether the parameter will use all the arguments left in the chain, or whether it will just consume one.- Parameters:
allArguments- Whether all arguments will be consumed- Returns:
- This builder, for chaining
-
build
Tests for validity and creates thisValueParameter.- Specified by:
buildin interfaceAbstractBuilder<ValueParameter<Component>>- Returns:
- The
ValueParameter - Throws:
IllegalStateException- if theComponentSerializerhas not been specified
-