cds.util
Class ParamList

java.lang.Object
  extended bycds.util.ParamList

class ParamList
extends java.lang.Object

Options: simple class for analysing command line options This class recognizes the following model:
-xyZ012 param1 -lv param2=val2 -X param3 param4=val4 ...
options can be any letter (upper or lowercase and digits)

options and parameters are both positional and can be accessed and checked directly as many times as needed, or sequentially only once. A parameter can be associated with a value written param=value or param:value

Version:
1.0 Dec 2002
Author:
Marc Wenger

Field Summary
(package private)  int ikey
           
(package private)  java.util.HashMap parameters
           
(package private)  java.util.ArrayList paramlist
           
 
Constructor Summary
(package private) ParamList(int size)
           
 
Method Summary
(package private)  void add(java.lang.String name)
           
(package private)  void add(java.lang.String name, java.lang.String value)
           
(package private)  java.lang.String getValue(java.lang.String name)
           
(package private)  boolean hasParameter(java.lang.String name)
           
(package private)  java.lang.String next()
           
(package private)  void setValue(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

java.util.HashMap parameters

paramlist

java.util.ArrayList paramlist

ikey

int ikey
Constructor Detail

ParamList

ParamList(int size)
Method Detail

add

void add(java.lang.String name)

add

void add(java.lang.String name,
         java.lang.String value)

setValue

void setValue(java.lang.String name,
              java.lang.String value)

next

java.lang.String next()

getValue

java.lang.String getValue(java.lang.String name)

hasParameter

boolean hasParameter(java.lang.String name)