public class PartialRestriction extends AbstractCommonRestriction implements HelpHint
Constructor and Description |
---|
PartialRestriction(Collection<Integer> indices,
ArgumentsRestriction argumentsRestriction) |
PartialRestriction(Collection<Integer> indices,
OptionRestriction optionRestriction) |
PartialRestriction(int[] indices,
ArgumentsRestriction argumentsRestriction) |
PartialRestriction(int[] indices,
OptionRestriction optionRestriction) |
Modifier and Type | Method and Description |
---|---|
String[] |
getContentBlock(int blockNumber)
Gets the content block with the given number
|
HelpFormat |
getFormat()
Gets the format of the provided help information
|
String |
getPreamble()
Gets the preamble text that should be included
|
int |
numContentBlocks()
Gets the number of content blocks provided
|
<T> void |
postValidate(ParseState<T> state,
ArgumentsMetadata arguments,
Object value)
Method that is called after Airline has converted a string argument
received into a strongly typed Java value
|
<T> void |
postValidate(ParseState<T> state,
OptionMetadata option,
Object value)
Method that is called after Airline has converted a string argument
received into a strongly typed Java value
|
<T> void |
preValidate(ParseState<T> state,
ArgumentsMetadata arguments,
String value)
Method that is called before Airline attempts to convert a string
argument received into a strongly typed Java value
|
<T> void |
preValidate(ParseState<T> state,
OptionMetadata option,
String value)
Method that is called before Airline attempts to convert a string
argument received into a strongly typed Java value
|
finalValidate, finalValidate, getArgumentTitle, getArgumentTitle
public PartialRestriction(int[] indices, OptionRestriction optionRestriction)
public PartialRestriction(int[] indices, ArgumentsRestriction argumentsRestriction)
public PartialRestriction(Collection<Integer> indices, OptionRestriction optionRestriction)
public PartialRestriction(Collection<Integer> indices, ArgumentsRestriction argumentsRestriction)
public <T> void preValidate(ParseState<T> state, OptionMetadata option, String value)
OptionRestriction
preValidate
in interface OptionRestriction
preValidate
in class AbstractCommonRestriction
state
- Parser stateoption
- Option meta-datavalue
- String valuepublic <T> void postValidate(ParseState<T> state, OptionMetadata option, Object value)
OptionRestriction
postValidate
in interface OptionRestriction
postValidate
in class AbstractCommonRestriction
state
- Parser stateoption
- Option meta-datavalue
- Strongly typed valuepublic <T> void preValidate(ParseState<T> state, ArgumentsMetadata arguments, String value)
ArgumentsRestriction
preValidate
in interface ArgumentsRestriction
preValidate
in class AbstractCommonRestriction
state
- Parser statearguments
- Arguments meta-datavalue
- String valuepublic <T> void postValidate(ParseState<T> state, ArgumentsMetadata arguments, Object value)
ArgumentsRestriction
postValidate
in interface ArgumentsRestriction
postValidate
in class AbstractCommonRestriction
state
- Parser statearguments
- Arguments meta-datavalue
- Strongly typed valuepublic String getPreamble()
HelpHint
getPreamble
in interface HelpHint
public HelpFormat getFormat()
HelpHint
public int numContentBlocks()
HelpHint
Help generators should consult the HelpHint.getFormat()
return value to
determine how to format the content blocks but they are not required to
do so
numContentBlocks
in interface HelpHint
public String[] getContentBlock(int blockNumber)
HelpHint
getContentBlock
in interface HelpHint
blockNumber
- Block numberCopyright © 2012–2017. All rights reserved.