T
- Created instancespublic interface Linenote<T>
choiceDescriptors()
is typically sent to the user
interface in a serialized (like JSON) format. This description is use to provide the user the necessary inputs and to
build a single string representation of the user's choice.Modifier and Type | Method and Description |
---|---|
List<ChoiceDescriptor> |
choiceDescriptors()
Available choices.
|
default ImmutableSet<String> |
getChoiceLabels()
Get all available choice labels.
|
T |
parse(String s)
Parse a line notation.
|
T |
parseWithVariableSubstitution(String s,
String pattern,
Function<String,String> variables)
Parse linenote with value parameter substitutions.
|
List<ChoiceDescriptor> choiceDescriptors()
T parse(String s)
s
- Line notation to applyIllegalArgumentException
- if creation failedT parseWithVariableSubstitution(String s, String pattern, Function<String,String> variables)
s
- Line notation to applypattern
- Regular expression to capture parameter expressionsvariables
- Lookup for variable valuesIllegalArgumentException
- if creation faileddefault ImmutableSet<String> getChoiceLabels()