org.jargp
Class ParameterSet

java.lang.Object
  |
  +--org.jargp.ParameterSet

public class ParameterSet
extends java.lang.Object

Command line parameter collection definition. Each collection consists of some number of parameter definitions. Multiple collections may be linked to function as a single collection.

Author:
Dennis M. Sosnoski

Field Summary
private  org.jargp.ParameterDef[] m_knownArguments
          Arguments known by this handler.
private  org.jargp.ParameterSet m_nextSet
          Next parameter set for control flags not included in this one.
 
Constructor Summary
ParameterSet(org.jargp.ParameterDef[] defs, org.jargp.ParameterSet next)
          Constructor
 
Method Summary
(package private)  org.jargp.ParameterDef findDef(char flag)
          Find the parameter definition for a particular control flag.
(package private)  org.jargp.ParameterDef indexDef(int index)
          Get the parameter definition at a particular position in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_knownArguments

private final org.jargp.ParameterDef[] m_knownArguments
Arguments known by this handler.


m_nextSet

private final org.jargp.ParameterSet m_nextSet
Next parameter set for control flags not included in this one.

Constructor Detail

ParameterSet

public ParameterSet(org.jargp.ParameterDef[] defs,
                    org.jargp.ParameterSet next)
Constructor

Parameters:
defs - parameter definitions for this handler
next - parameter set used for parameters not defined in this set
Method Detail

findDef

org.jargp.ParameterDef findDef(char flag)
Find the parameter definition for a particular control flag. If the control flag is not defined in the set this will pass the call on to the next set until we reach the end of the chain.

Parameters:
flag - control flag for parameter

indexDef

org.jargp.ParameterDef indexDef(int index)
Get the parameter definition at a particular position in the list. If the index value supplied is not defined in the set this will pass the call on to the next set until we reach the end of the chain. The caller can index through all defined values by starting at zero and incrementing until a null is returned.

Parameters:
index - position for parameter definition to be returned