Note:
- Options can be repeated. What that means is up to the program.
- The '--' sequence terminates argument processing.
- A '-' by itself is not a flag.
- Unrecognized flags are an error.
- Unrecognized arguments are moved after the processed flags.
- Author:
- DM Smith [dmsmith555 at yahoo dot com]
- See Also:
for license details.
The copyright to this program is held by it's authors.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
programName
private String programName
args
private String[] args
programOptions
private OptionList programOptions
nonOptionArgs
private List nonOptionArgs
- The position in the array that is currently being studied.
suppliedOptions
private Map suppliedOptions
GetOptions
public GetOptions(String programName,
String[] args,
OptionList programOptions)
getProgramName
public String getProgramName()
- Returns:
- the programName
setProgramName
public void setProgramName(String programName)
- Parameters:
programName
- the programName to set
parse
private void parse()
swap
public static void swap(Object[] array,
int firstStart,
int firstEnd,
int secondEnd)
- Swap adjacent blocks in an array.
- Parameters:
array
- The array to modify in placefirstStart
- the index of the start of the first blockfirstEnd
- the index of the end of the first blocksecondEnd
- the index of the end of the second block. Note: the start of the second block is firstEnd + 1