Class AbstractAllowedValuesRestriction
java.lang.Object
com.github.rvesse.airline.restrictions.AbstractCommonRestriction
com.github.rvesse.airline.restrictions.common.AbstractAllowedValuesRestriction
- All Implemented Interfaces:
HelpHint, ArgumentsRestriction, OptionRestriction
- Direct Known Subclasses:
AllowedEnumValuesRestriction, AllowedRawValuesRestriction, AllowedValuesRestriction
public abstract class AbstractAllowedValuesRestriction
extends AbstractCommonRestriction
implements HelpHint
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final booleanprotected static final booleanprotected final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]getContentBlock(int blockNumber) Gets the content block with the given numberGets the format of the provided help informationGets the preamble text that should be includedintGets the number of content blocks providedMethods inherited from class AbstractCommonRestriction
finalValidate, finalValidate, getArgumentTitle, getArgumentTitle, getOptionTitle, postValidate, postValidate, preValidate, preValidate
-
Field Details
-
CASE_SENSITIVE
protected static final boolean CASE_SENSITIVE- See Also:
-
CASE_INSENSITIVE
protected static final boolean CASE_INSENSITIVE- See Also:
-
rawValues
-
caseInsensitive
protected final boolean caseInsensitive
-
-
Constructor Details
-
AbstractAllowedValuesRestriction
public AbstractAllowedValuesRestriction(boolean caseInsensitive)
-
-
Method Details
-
asObjects
-
getPreamble
Description copied from interface:HelpHintGets the preamble text that should be included- Specified by:
getPreamblein interfaceHelpHint- Returns:
- Preamble text
-
getFormat
Description copied from interface:HelpHintGets the format of the provided help information -
numContentBlocks
public int numContentBlocks()Description copied from interface:HelpHintGets the number of content blocks providedHelp generators should consult the
HelpHint.getFormat()return value to determine how to format the content blocks but they are not required to do so- Specified by:
numContentBlocksin interfaceHelpHint- Returns:
- Number of content blocks
-
getContentBlock
Description copied from interface:HelpHintGets the content block with the given number- Specified by:
getContentBlockin interfaceHelpHint- Parameters:
blockNumber- Block number- Returns:
- Content Block
-
getAllowedValues
-