Interface VariableValueParameters.LiteralBuilder<T>
-
- All Superinterfaces:
Buildable.Builder<ValueParameter<T>>
,Builder<ValueParameter<T>,VariableValueParameters.LiteralBuilder<T>>
,ResettableBuilder<ValueParameter<T>,VariableValueParameters.LiteralBuilder<T>>
- Enclosing class:
- VariableValueParameters
public static interface VariableValueParameters.LiteralBuilder<T> extends Builder<ValueParameter<T>,VariableValueParameters.LiteralBuilder<T>>
A builder that createsValueParameter
s that requires a specific sequence of arguments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ValueParameter<T>
build()
Tests for validity and creates thisValueParameter
.default VariableValueParameters.LiteralBuilder<T>
literal(Collection<String> literal)
Sets the sequence of strings that need to be matched at runtime.VariableValueParameters.LiteralBuilder<T>
literal(Supplier<? extends Collection<String>> literalSupplier)
Sets aSupplier
that provides the sequence of strings that need to be matched at runtime.VariableValueParameters.LiteralBuilder<T>
returnValue(Supplier<T> returnValueSupplier)
Sets aSupplier
that provides the object to return if this parameter parses correctly.default VariableValueParameters.LiteralBuilder<T>
returnValue(T returnValue)
Sets the object to return if this parameter parses correctly.
-
-
-
Method Detail
-
literal
VariableValueParameters.LiteralBuilder<T> literal(Supplier<? extends Collection<String>> literalSupplier)
Sets aSupplier
that provides the sequence of strings that need to be matched at runtime.Consumers of the API should supply an ordered collection.
- Parameters:
literalSupplier
- TheSupplier
- Returns:
- This builder, for chaining
-
literal
default VariableValueParameters.LiteralBuilder<T> literal(Collection<String> literal)
Sets the sequence of strings that need to be matched at runtime.Consumers of the API should supply an ordered collection.
- Parameters:
literal
- The sequence of elements- Returns:
- This builder, for chaining
-
returnValue
VariableValueParameters.LiteralBuilder<T> returnValue(Supplier<T> returnValueSupplier)
Sets aSupplier
that provides the object to return if this parameter parses correctly.- Parameters:
returnValueSupplier
- TheSupplier
- Returns:
- This builder, for chaining
-
returnValue
default VariableValueParameters.LiteralBuilder<T> returnValue(T returnValue)
Sets the object to return if this parameter parses correctly.- Parameters:
returnValue
- TheObject
- Returns:
- This builder, for chaining
-
build
ValueParameter<T> build()
Tests for validity and creates thisValueParameter
.- Specified by:
build
in interfaceBuildable.Builder<T>
- Returns:
- The
ValueParameter
- Throws:
IllegalStateException
- if the literal and the return object have not been specified
-
-