All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sep.io.ArgumentKeeper

java.lang.Object
   |
   +----sep.io.ArgumentKeeper

public class ArgumentKeeper
extends Object
This class stores and retrieves a command line argument list or any other array of Strings.

The class distinguishes three types of arguments:

See Also:
get, getString, getInt, getFloat, getIntArray, getFloatArray

Constructor Index

 o ArgumentKeeper(String[])

Method Index

 o containsKey(String)
 o get(String)
 o getAxis(String)
axis1=12,.004f,0.0f,time,sec
 o getAxis(String, String)
 o getBoolean(String)
 o getBoolean(String, boolean)
 o getBoolean(String, String)
 o getDouble(String)
 o getDouble(String, double)
 o getDouble(String, String)
 o getFloat(String)
 o getFloat(String, float)
 o getFloat(String, String)
 o getFloatArray(String)
 o getFloatArray(String, float[])
alternative default version: the default is not a string, but of the return type.
 o getFloatArray(String, String)
 o getInt(String)
 o getInt(String, int)
 o getInt(String, String)
 o getIntArray(String)
 o getIntArray(String, int[])
alternative default version: the default is not a string, but of the return type.
 o getIntArray(String, String)
 o getNames()
 o getString(String)
 o getString(String, String)
 o getStringArray(String)
 o getStringArray(String, String)
 o getStringArray(String, String[])
alternative default version: the default is not a string, but of the return type.
 o isEmpty()
 o nOfParamWith(String)
Will return the number of arguments that start with String "root" and end with a counter: e.g.
 o size()

Constructors

 o ArgumentKeeper
 public ArgumentKeeper(String args[])

Methods

 o size
 public int size()
 o isEmpty
 public boolean isEmpty()
 o containsKey
 public boolean containsKey(String myflag)
 o nOfParamWith
 public int nOfParamWith(String root)
Will return the number of arguments that start with String "root" and end with a counter: e.g. args contains n1=4 n2=5 n3=7 and root is "n" than the return value is 3.

 o get
 public String get(String paraName)
 o getString
 public String getString(String paraName)
 o getInt
 public int getInt(String paraName)
 o getFloat
 public float getFloat(String paraName)
 o getDouble
 public double getDouble(String paraName)
 o getBoolean
 public boolean getBoolean(String paraName)
 o getNames
 public String[] getNames()
 o getString
 public String getString(String paraName,
                         String deflt)
 o getInt
 public int getInt(String paraName,
                   String deflt)
 o getFloat
 public float getFloat(String paraName,
                       String deflt)
 o getDouble
 public double getDouble(String paraName,
                         String deflt)
 o getBoolean
 public boolean getBoolean(String paraName,
                           String deflt)
 o getInt
 public int getInt(String paraName,
                   int deflt)
 o getFloat
 public float getFloat(String paraName,
                       float deflt)
 o getDouble
 public double getDouble(String paraName,
                         double deflt)
 o getBoolean
 public boolean getBoolean(String paraName,
                           boolean deflt)
 o getIntArray
 public int[] getIntArray(String paraName)
Parameters:
par=1,2,3 - returns int i = int[3] with i[0]=1 i[1]=2 i[3]=2
 o getIntArray
 public int[] getIntArray(String paraName,
                          int deflt[])
alternative default version: the default is not a string, but of the return type. I think it might be superior. We could offer both.

 o getIntArray
 public int[] getIntArray(String paraName,
                          String deflt)
 o getFloatArray
 public float[] getFloatArray(String paraName)
Parameters:
par=.5,2 - returns float i = float[3] with i[0]=.5f i[1]=2.f
 o getFloatArray
 public float[] getFloatArray(String paraName,
                              float deflt[])
alternative default version: the default is not a string, but of the return type. I think it might be superior. We could offer both.

 o getFloatArray
 public float[] getFloatArray(String paraName,
                              String deflt)
 o getStringArray
 public String[] getStringArray(String paraName)
Parameters:
par=high,low - returns String[] i = String[2] with i[0]=high i[1]=low
 o getStringArray
 public String[] getStringArray(String paraName,
                                String deflt[])
alternative default version: the default is not a string, but of the return type. I think it might be superior. We could offer both.

 o getStringArray
 public String[] getStringArray(String paraName,
                                String deflt)
 o getAxis
 public Axis getAxis(String paraName)
axis1=12,.004f,0.0f,time,sec

 o getAxis
 public Axis getAxis(String paraName,
                     String deflt)

All Packages  Class Hierarchy  This Package  Previous  Next  Index