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.TextBuilder
consumeAllArguments(boolean allArguments)
Sets whether the parameter will use all the arguments left in the chain, or whether it will just consume one.VariableValueParameters.TextBuilder
serializer(ComponentSerializer<Component,? extends Component,java.lang.String> serializer)
Sets theComponentSerializer
for use by the element.VariableValueParameters.TextBuilder
serializerSupplier(java.util.function.Supplier<ComponentSerializer<Component,? extends Component,java.lang.String>> serializerSupplier)
Sets theComponentSerializer
for use by the element, though the use of aSupplier
.
-
-
-
Method Detail
-
serializer
VariableValueParameters.TextBuilder serializer(ComponentSerializer<Component,? extends Component,java.lang.String> serializer)
Sets theComponentSerializer
for use by the element.Setting this will replace any
ComponentSerializer
s orSupplier
s that has already been set on this builder.- Parameters:
serializer
- AComponentSerializer
- Returns:
- This builder, for chaining
-
serializerSupplier
VariableValueParameters.TextBuilder serializerSupplier(java.util.function.Supplier<ComponentSerializer<Component,? extends Component,java.lang.String>> serializerSupplier)
Sets theComponentSerializer
for use by the element, though the use of aSupplier
.Setting this will replace any
ComponentSerializer
s orSupplier
s that has already been set on this builder.- Parameters:
serializerSupplier
- ASupplier
that 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 java.lang.IllegalStateException
Tests for validity and creates thisValueParameter
.- Specified by:
build
in interfaceAbstractBuilder<ValueParameter<Component>>
- Specified by:
build
in interfaceBuildable.Builder<ValueParameter<Component>>
- Returns:
- The
ValueParameter
- Throws:
java.lang.IllegalStateException
- if theComponentSerializer
has not been specified
-
-