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