public final class ArgumentParserUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
getArgumentValue(String argumentName,
List<String> argumentList)
Gets argument value.
|
static Object |
getArgumentValue(String argumentName,
List<String> argumentList,
boolean isRequired)
Gets argument value.
|
static Object |
getArgumentValue(String argumentName,
List<String> argumentList,
boolean isRequired,
Object defaultValue)
Deconstructs the user provided arguments into discrete configuration values.
|
public static Object getArgumentValue(String argumentName, List<String> argumentList, boolean isRequired)
argumentName
- Name of the argument for which the value needs to be discovered.argumentList
- Input arguments parsed as a list.isRequired
- Mark argument as required.public static Object getArgumentValue(String argumentName, List<String> argumentList)
argumentName
- Name of the argument for which the value needs to be discovered.argumentList
- Input arguments parsed as a list.public static Object getArgumentValue(String argumentName, List<String> argumentList, boolean isRequired, Object defaultValue)
argumentName
- Argument for which the value needs to be identified.argumentList
- Input arguments parsed as a list.isRequired
- Mark argument as required.defaultValue
- default value to be set if argument value is not available.Copyright © 2023. All rights reserved.