Package eu.bandm.tools.expander
Class ParameterExpander.Value
java.lang.Object
eu.bandm.tools.expander.ParameterExpander.Value
- Enclosing class:
ParameterExpander
A parameter value, containing either a substitution text or an error.
- Since:
- 1.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParameterExpander.Value
The value containing empty substitution text. -
Method Summary
Modifier and TypeMethodDescriptionabstract String
getText()
Returns the contained substitution text or throws the contained error.abstract boolean
isValid()
Checks whether this value contains a valid substitution text.static ParameterExpander.Value
Creates a value with the given substitution text.
-
Field Details
-
EMPTY
The value containing empty substitution text.
-
-
Method Details
-
isValid
public abstract boolean isValid()Checks whether this value contains a valid substitution text.- Returns:
true
if the value contains a substitution text;false
if it contains an error.
-
getText
Returns the contained substitution text or throws the contained error.- Returns:
- the contained substitution text, if available
- Throws:
ExplicitErrorException
- the contained error, if available
-
of
Creates a value with the given substitution text.- Parameters:
text
- the substitution text- Returns:
- a value containing the given substitution text
-