java.lang.Object
net.foxgenesis.util.ProgramArguments
Deprecated, for removal: This API element is subject to removal in a future version.
Class to parse command line parameters.
Parsing code taken from https://stackoverflow.com/a/7341724
- Author:
- Ashley
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCProgramArguments(String[] args) Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCvoidclear()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCintDeprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCDeprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCgetParameter(String key) Deprecated, for removal: This API element is subject to removal in a future version.Get the value of parameterkey.Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCbooleanDeprecated, for removal: This API element is subject to removal in a future version.Check if theprogram argumentscontains the flag "--key".booleanhasParameter(String key) Deprecated, for removal: This API element is subject to removal in a future version.Check if theprogram argumentscontains the parameter "-key".intDeprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOCvoidDeprecated, for removal: This API element is subject to removal in a future version.Parse the given arguments intoflags,parametersandarguments.toString()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC
-
Constructor Details
-
ProgramArguments
public ProgramArguments()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- See Also:
-
ProgramArguments
Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- Parameters:
args- - program arguments to parse- See Also:
-
-
Method Details
-
parse
Deprecated, for removal: This API element is subject to removal in a future version.Parse the given arguments intoflags,parametersandarguments.- Parameters:
args- - program arguments to parse
-
argumentCount
public int argumentCount()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- Returns:
-
flagCount
public int flagCount()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- Returns:
-
parameterCount
public int parameterCount()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- Returns:
-
hasFlag
Deprecated, for removal: This API element is subject to removal in a future version.Check if theprogram argumentscontains the flag "--key".- Parameters:
key- - flag to check- Returns:
- returns
trueif the arguments contains the flag
-
hasParameter
Deprecated, for removal: This API element is subject to removal in a future version.Check if theprogram argumentscontains the parameter "-key".- Parameters:
key- - parameter to check- Returns:
- returns
trueif the arguments contains the parameter
-
getParameter
Deprecated, for removal: This API element is subject to removal in a future version.Get the value of parameterkey.- Parameters:
key- - The parameter key- Returns:
- Returns the
valueof parameterkey. - Throws:
NullPointerException- Thrown if parameter list does not contain thekey.- See Also:
-
getParameters
Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- Returns:
-
getArguments
Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC- Returns:
-
clear
public void clear()Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC -
toString
Deprecated, for removal: This API element is subject to removal in a future version.NEED_JAVADOC
-