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 String
If settings for option are not known upon initialization, an up-to-date description is requested when needed (e.g.default int
Optional: position of key in the list of arguments.boolean
Parse stringarg
and set configurable parameters that correspond to this command line option.default void
report
(PrintStream output) Report settings of configurable parameters that correspond to this command line option (optional implementation).
-
Method Details
-
parse
Parse stringarg
and set configurable parameters that correspond to this command line option.Note: should only return
false
if a warning or other information was logged.- Parameters:
arg
- for parsing by command line option- Returns:
true
if parsing successful
-
report
Report settings of configurable parameters that correspond to this command line option (optional implementation).- Parameters:
output
- the outlet to send reports to
-
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--help
options).- 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
-