Package com.lmax.simpledsl.api
Interface DslArg
-
- All Known Implementing Classes:
OptionalArg,RepeatingArgGroup,RequiredArg,SimpleDslArg
public interface DslArgThe base class for all arg types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]getAllowedValues()Get the specific values that this argument will accept.java.lang.StringgetDefaultValue()Get a default value for this argument.java.lang.StringgetMultipleValueSeparator()Get the separator that can be used to separate multiple values.java.lang.StringgetName()Get the name of this argument.booleanisAllowMultipleValues()Check whether this argument can take multiple values.booleanisRequired()Determine if a value is required for this argument.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Get the name of this argument.- Returns:
- the argument name.
-
isRequired
boolean isRequired()
Determine if a value is required for this argument.- Returns:
- true if and only if this argument is required.
-
getDefaultValue
java.lang.String getDefaultValue()
Get a default value for this argument.If the argument is required, this method will throw an
IllegalArgumentException.- Returns:
- the default value for the argument
-
isAllowMultipleValues
boolean isAllowMultipleValues()
Check whether this argument can take multiple values.- Returns:
- true if and only if the argument takes multiple values.
-
getMultipleValueSeparator
java.lang.String getMultipleValueSeparator()
Get the separator that can be used to separate multiple values.- Returns:
- the separator for splitting multiple values.
-
getAllowedValues
java.lang.String[] getAllowedValues()
Get the specific values that this argument will accept.- Returns:
- the values allowed by this argument, or null if all values are allowed
-
-