Package org.apache.fulcrum.yaafi.cli
Klasse Getopt
java.lang.Object
org.apache.fulcrum.yaafi.cli.Getopt
Extremely simple command line parsing class.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Does the command-line options exist?boolean
getBooleanValue
(String option) Returns the boolean value for the given option.boolean
getBooleanValue
(String option, boolean defaultValue) Returns the boolean value for the given option.getStringValue
(String option) Returns the string value for the given option.getStringValue
(String option, String defaultValue) Returns the string value for the given option.int
length()
-
Konstruktordetails
-
Getopt
Constructor- Parameter:
args
- the command line parameters
-
Getopt
Constructor.- Parameter:
args
- the command line parametersprefix
- the prefix for command line parameters
-
-
Methodendetails
-
contains
Does the command-line options exist?- Parameter:
option
- the option we are looking for- Gibt zurück:
- is the given option contained in the command line arguments?
-
length
public int length()- Gibt zurück:
- the number of command line arguments
-
getStringValue
Returns the string value for the given option.- Parameter:
option
- the option- Gibt zurück:
- the associated value
-
getStringValue
Returns the string value for the given option.- Parameter:
option
- the optiondefaultValue
- the default value if the option is not defined- Gibt zurück:
- the associated value
-
getBooleanValue
Returns the boolean value for the given option.- Parameter:
option
- the option- Gibt zurück:
- the associated value
-
getBooleanValue
Returns the boolean value for the given option.- Parameter:
option
- the optiondefaultValue
- the default value if the option is not defined- Gibt zurück:
- the associated value
-