public class CommandLineReader extends Object
Constructor and Description |
---|
CommandLineReader(String[] args)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
argCount() |
int |
contained(String value)
Checks if the given value is contained in the arguments and returns the index.
|
int |
contained(String value,
int start)
Checks if the given value is contained in the arguments and returns the index.
|
int |
contained(String value,
int start,
int end)
Checks if the given value is contained in the arguments and returns the index.
|
String |
getArg(int index) |
public CommandLineReader(String[] args)
args
- the passed command line argumentspublic int contained(String value, int start, int end)
value
- the value to search for (exact match, case sensitive)start
- the start indexend
- the end index (the last checked index is end - 1
)public int contained(String value, int start)
start
on are searched.value
- the value to search for (exact match, case sensitive)start
- the start indexpublic int contained(String value)
value
- the value to search for (exact match, case sensitive)public int argCount()