Class GreedyMaybeListValueOptionParser<T>
java.lang.Object
com.github.rvesse.airline.parser.AbstractParser<T>
com.github.rvesse.airline.parser.options.AbstractOptionParser<T>
com.github.rvesse.airline.parser.options.ListValueOptionParser<T>
com.github.rvesse.airline.parser.options.MaybeListValueOptionParser<T>
com.github.rvesse.airline.parser.options.GreedyMaybeListValueOptionParser<T>
- Type Parameters:
T- Command Type
- All Implemented Interfaces:
OptionParser<T>
A variation on the
MaybeListValueOptionParser that is greedy
This primarily makes a difference when used with commands that also use Arguments or DefaultOption.
If that is the case using this parser could incorrectly consume values not intended to be part of the list. Users
creating CLIs should be certain that this represents the behaviour they want.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanGreedySearch(ParseState<T> state) Gets whether we can do a greedy search for list value(s)Methods inherited from class MaybeListValueOptionParser
parseOptionsMethods inherited from class ListValueOptionParser
getValuesMethods inherited from class AbstractOptionParser
findOption, findOption, hasShortNamePrefix, isSeparatorOrOption, noValueForOptionMethods inherited from class AbstractParser
getTypeConverter
-
Constructor Details
-
GreedyMaybeListValueOptionParser
public GreedyMaybeListValueOptionParser() -
GreedyMaybeListValueOptionParser
public GreedyMaybeListValueOptionParser(char separator)
-
-
Method Details
-
canGreedySearch
Description copied from class:MaybeListValueOptionParserGets whether we can do a greedy search for list value(s)- Overrides:
canGreedySearchin classMaybeListValueOptionParser<T>- Parameters:
state- Parser State- Returns:
- True if a greedy search is permitted, false otherwise
-