Interface VariableValueParameters.TextBuilder
-
- All Superinterfaces:
AbstractBuilder<ValueParameter<Component>>,Buildable.Builder<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 intoComponent.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValueParameter<Component>build()Tests for validity and creates thisValueParameter.VariableValueParameters.TextBuilderconsumeAllArguments(boolean allArguments)Sets whether the parameter will use all the arguments left in the chain, or whether it will just consume one.VariableValueParameters.TextBuilderserializer(ComponentSerializer<Component,? extends Component,String> serializer)Sets theComponentSerializerfor use by the element.VariableValueParameters.TextBuilderserializerSupplier(Supplier<ComponentSerializer<Component,? extends Component,String>> serializerSupplier)Sets theComponentSerializerfor use by the element, though the use of aSupplier.
-
-
-
Method Detail
-
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
VariableValueParameters.TextBuilder consumeAllArguments(boolean allArguments)
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
ValueParameter<Component> build() throws IllegalStateException
Tests for validity and creates thisValueParameter.- Specified by:
buildin interfaceAbstractBuilder<ValueParameter<Component>>- Specified by:
buildin interfaceBuildable.Builder<ValueParameter<Component>>- Returns:
- The
ValueParameter - Throws:
IllegalStateException- if theComponentSerializerhas not been specified
-
-