Package org.evoludo.util
Interface CLOption.CLODelegate
- Enclosing class:
CLOption
public static interface CLOption.CLODelegate
Interface to process command line arguments
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringIf settings for option are not known upon initialization, an up-to-date description is requested when needed (e.g.default intOptional: position of key in the list of arguments.booleanParse stringargand set configurable parameters that correspond to this command line option.
-
Method Details
-
parse
Parse stringargand set configurable parameters that correspond to this command line option.Note: returning
falsetriggers a warning about which command line option failed to correctly parse. If the parser can rectify the issue on the spot this is also acceptable. In that case the method should returntrueand possibly log the fact that parameters have been adjusted.- Parameters:
arg- the argument for parsing by command line option- Returns:
trueif parsing successful
-
getDescription
If settings for option are not known upon initialization, an up-to-date description is requested when needed (e.g. if help is requested, typically using--helpoptions).- Returns:
- description of command line option.
-
getKeyPos
default int getKeyPos()Optional: position of key in the list of arguments. Used in help display.- Returns:
- the position of the key
-