Index
All Classes and Interfaces|All Packages
A
- add(E) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Parser
-
Registers an option with this parser.
- addAliases(String...) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Adds additional aliases to this option for user convenience.
- addParameter(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Adds a parameter to this option, validating it against
Option.isValid(String)
. - askBoolean(String) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method that calls
CLIHelper.askBoolean(String, Boolean, boolean)
with no default andallowEmpty = false
. - askBoolean(String, Boolean) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method that calls
CLIHelper.askBoolean(String, Boolean, boolean)
withallowEmpty = false
. - askBoolean(String, Boolean, boolean) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Asks the user for a boolean value using the specified prompt on the command line.
- askFloat(String) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askFloat(String, Float, Float, Float, boolean)
with no defaultValue or min/max range andallowEmpty = false
. - askFloat(String, Float) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askFloat(String, Float, Float, Float, boolean)
with no min/max range andallowEmpty = false
. - askFloat(String, Float, Float, Float, boolean) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Asks the user for a float value using the specified prompt on the command line.
- askInteger(String) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askInteger(String, Integer, Integer, Integer, boolean)
with no defaultValue or min/max range andallowEmpty = false
. - askInteger(String, Integer) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askInteger(String, Integer, Integer, Integer, boolean)
with no min/max range andallowEmpty = false
. - askInteger(String, Integer, Integer, Integer, boolean) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Asks the user for an integer value using the specified prompt on the command line.
- askLong(String) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askLong(String, Long, Long, Long, boolean)
with no defaultValue or min/max range andallowEmpty = false
. - askLong(String, Long) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askLong(String, Long, Long, Long, boolean)
with no min/max range andallowEmpty = false
. - askLong(String, Long, Long, Long, boolean) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Asks the user for a long value using the specified prompt on the command line.
- askString(String) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askString(String, String, Integer, Integer, boolean)
with no defaultValue or min/max length andallowEmpty = false
. - askString(String, String) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Convenience method for
CLIHelper.askString(String, String, Integer, Integer, boolean)
with no min/max length andallowEmpty = false
. - askString(String, String, Integer, Integer, boolean) - Static method in class eu.svjatoslav.commons.cli_helper.CLIHelper
-
Asks the user for a string value using the specified prompt on the command line.
C
- checkSuccess() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Parser
-
A convenience method to see if the last parse succeeded.
- CLIHelper - Class in eu.svjatoslav.commons.cli_helper
-
A utility class that provides methods for reading and validating various data types from the command line.
- CLIHelper() - Constructor for class eu.svjatoslav.commons.cli_helper.CLIHelper
D
- defaultValue - Variable in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
-
Default value to return if the user does not provide a parameter.
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Describes the kind or format of the expected parameter(s), e.g.
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOption
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOptions
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Provides a short description of the expected format (e.g., "Existing file", "Non-existing file", or "File").
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
-
Provides a short description of the expected file format(s).
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FloatOption
-
Describes the expected format ("Floating point number").
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.IntegerOption
-
Describes the expected format ("Integer.").
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.NullOption
-
Describes the expected format of this option (i.e., no parameters).
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
- describeFormat() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOptions
- description - Variable in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Human-readable purpose of this option (e.g., "Input image path").
- DirectoryOption - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts exactly one parameter interpreted as a directory path.
- DirectoryOption(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOption
-
Creates a DirectoryOption object with a specified description.
- DirectoryOptions - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts one or more directory paths.
- DirectoryOptions(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOptions
-
Creates a DirectoryOptions object with a specified description, requiring one or more directories.
- DOES_NOT_MATTER - Enum constant in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.ExistenceType
-
Resource existence does not matter.
E
- eu.svjatoslav.commons.cli_helper - package eu.svjatoslav.commons.cli_helper
- eu.svjatoslav.commons.cli_helper.parameter_parser - package eu.svjatoslav.commons.cli_helper.parameter_parser
- eu.svjatoslav.commons.cli_helper.parameter_parser.parameter - package eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
- ExistenceType - Enum Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Defines whether a file/directory resource must exist, must not exist, or if it does not matter.
F
- FileOption - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts exactly one parameter which is interpreted as a file path.
- FileOption(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Creates a FileOption requiring exactly one parameter that represents a file.
- FileOptions - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts one or more file paths.
- FileOptions(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
-
Constructs a FileOptions object.
- findParameterByAlias(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Parser
-
Looks up an option by alias.
- FloatOption - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts exactly one floating-point parameter.
- FloatOption(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FloatOption
-
Constructs a FloatOption with a brief description and exactly one parameter.
G
- getAliasesAsString() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Returns this option's aliases as a comma-separated string (e.g.
- getHelp() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Returns a help message that includes the aliases, whether the option is mandatory, the format, and a brief description.
- getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Returns the parsed value (usually constructed from
Option.parameters
). - getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOption
-
Returns the directory as a
File
object. - getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOptions
-
Returns the directories as a list of
File
objects. - getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Returns the file chosen by the user (as a
File
object). - getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
-
Returns the list of file paths as
File
objects. - getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FloatOption
-
Returns the float value specified by the user.
- getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.IntegerOption
-
Returns the integer value specified by the user.
- getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.NullOption
-
Returns whether this option was present on the command line.
- getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
-
Returns the string parameter or the default value if none was provided.
- getValue() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOptions
-
Returns the list of strings provided by the user.
I
- IntegerOption - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts exactly one parameter interpreted as an integer.
- IntegerOption(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.IntegerOption
-
Constructs an IntegerOption with exactly one parameter required.
- isFileValid(ExistenceType, String) - Static method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Checks whether the given file path is valid according to the specified
ExistenceType
. - isMandatory() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
- isPresent() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
- isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Checks if a single parameter string is valid for this option.
- isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOption
-
Checks whether the provided path is valid based on the
ExistenceType
. - isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOptions
-
Validates each directory path against the specified
ExistenceType
. - isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Validates the given parameter against the
ExistenceType
rule. - isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
-
Validates a single file path against the configured existence type.
- isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FloatOption
-
Checks if the given string can be parsed as a float.
- isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.IntegerOption
-
Checks whether the given string can be parsed as an integer.
- isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.NullOption
-
Always returns
true
, since this option has no parameters and needs no validation. - isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
-
Always returns
true
since any string is considered valid for this option. - isValid(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOptions
-
Always returns true since any string is valid for this option.
M
- mandatory - Variable in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Whether this option is mandatory (i.e., must appear at least once on the CLI).
- matchesAlias(String) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Checks if a given alias matches this option.
- MUST_EXIST - Enum constant in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.ExistenceType
-
Resource shall exist.
- MUST_NOT_EXIST - Enum constant in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.ExistenceType
-
Resource shall not exist.
- mustExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOption
-
Requires that the directory must already exist.
- mustExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOptions
-
Requires that each directory must exist.
- mustExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Enforces that the file path must point to an existing file.
- mustExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
-
Requires that each file must already exist.
- mustNotExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOption
-
Requires that the directory must not already exist.
- mustNotExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.DirectoryOptions
-
Requires that each directory must not exist.
- mustNotExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption
-
Enforces that the file path must not exist.
- mustNotExist() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOptions
-
Requires that each file must not already exist.
N
- noMoreArguments() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Called when no more arguments can be added to this option, giving it a chance to verify correct usage (e.g., check if required parameters are missing).
- NONE - Enum constant in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.ParameterCount
-
Option has no parameters.
- NullOption - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts exactly zero parameters.
- NullOption(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.NullOption
-
Creates a NullOption (e.g.
O
- ONE - Enum constant in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.ParameterCount
-
Option has exactly one parameter.
- ONE_OR_MORE - Enum constant in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.ParameterCount
-
Option can have one or more parameters.
- Option<T,
I extends Option<?, I>> - Class in eu.svjatoslav.commons.cli_helper.parameter_parser -
Represents a command-line option (a flag or switch), which can be configured with: whether it's mandatory the number of parameters accepted a textual description aliases (the actual CLI flags, e.g., "--help" or "-h")
- Option(boolean, ParameterCount, String, String...) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Fully-custom constructor for an option.
- Option(String, ParameterCount, String...) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Simpler constructor that defaults to a non-mandatory option.
P
- ParameterCount - Enum Class in eu.svjatoslav.commons.cli_helper.parameter_parser
-
Defines how many parameters a command-line option can accept.
- parameters - Variable in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
The list of parameters provided on the command line for this option (if any).
- parse(String[]) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Parser
-
Parses the provided command-line arguments, matching them to registered options and their parameters.
- Parser - Class in eu.svjatoslav.commons.cli_helper.parameter_parser
-
This class parses command-line arguments against a set of registered
Option
objects. - Parser() - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.Parser
S
- setMandatory() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Sets this option as mandatory.
- setPresent(boolean) - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Option
-
Marks this option as present or not present.
- showHelp() - Method in class eu.svjatoslav.commons.cli_helper.parameter_parser.Parser
-
Prints all available options, their formats, and their descriptions.
- StringOption - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts exactly one string parameter.
- StringOption(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
-
Constructs a StringOption with no default value.
- StringOption(String, String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOption
-
Constructs a StringOption with a specified default value.
- StringOptions - Class in eu.svjatoslav.commons.cli_helper.parameter_parser.parameter
-
Represents a command-line option that accepts one or more string parameters.
- StringOptions(String) - Constructor for class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.StringOptions
-
Creates a StringOptions object, requiring one or more string parameters.
V
- valueOf(String) - Static method in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.ExistenceType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.ParameterCount
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.ExistenceType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class eu.svjatoslav.commons.cli_helper.parameter_parser.ParameterCount
-
Returns an array containing the constants of this enum class, in the order they are declared.
All Classes and Interfaces|All Packages