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
-
ArgumentKeeper(String[])
-
-
containsKey(String)
-
-
get(String)
-
-
getAxis(String)
-
axis1=12,.004f,0.0f,time,sec
-
getAxis(String, String)
-
-
getBoolean(String)
-
-
getBoolean(String, boolean)
-
-
getBoolean(String, String)
-
-
getDouble(String)
-
-
getDouble(String, double)
-
-
getDouble(String, String)
-
-
getFloat(String)
-
-
getFloat(String, float)
-
-
getFloat(String, String)
-
-
getFloatArray(String)
-
-
getFloatArray(String, float[])
-
alternative default version: the default is not a string, but of
the return type.
-
getFloatArray(String, String)
-
-
getInt(String)
-
-
getInt(String, int)
-
-
getInt(String, String)
-
-
getIntArray(String)
-
-
getIntArray(String, int[])
-
alternative default version: the default is not a string, but of
the return type.
-
getIntArray(String, String)
-
-
getNames()
-
-
getString(String)
-
-
getString(String, String)
-
-
getStringArray(String)
-
-
getStringArray(String, String)
-
-
getStringArray(String, String[])
-
alternative default version: the default is not a string, but of
the return type.
-
isEmpty()
-
-
nOfParamWith(String)
-
Will return the number of arguments that start with String "root"
and end with a counter:
e.g.
-
size()
-
ArgumentKeeper
public ArgumentKeeper(String args[])
size
public int size()
isEmpty
public boolean isEmpty()
containsKey
public boolean containsKey(String myflag)
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.
get
public String get(String paraName)
getString
public String getString(String paraName)
getInt
public int getInt(String paraName)
getFloat
public float getFloat(String paraName)
getDouble
public double getDouble(String paraName)
getBoolean
public boolean getBoolean(String paraName)
getNames
public String[] getNames()
getString
public String getString(String paraName,
String deflt)
getInt
public int getInt(String paraName,
String deflt)
getFloat
public float getFloat(String paraName,
String deflt)
getDouble
public double getDouble(String paraName,
String deflt)
getBoolean
public boolean getBoolean(String paraName,
String deflt)
getInt
public int getInt(String paraName,
int deflt)
getFloat
public float getFloat(String paraName,
float deflt)
getDouble
public double getDouble(String paraName,
double deflt)
getBoolean
public boolean getBoolean(String paraName,
boolean deflt)
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
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.
getIntArray
public int[] getIntArray(String paraName,
String deflt)
getFloatArray
public float[] getFloatArray(String paraName)
- Parameters:
- par=.5,2 - returns float i = float[3] with i[0]=.5f i[1]=2.f
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.
getFloatArray
public float[] getFloatArray(String paraName,
String deflt)
getStringArray
public String[] getStringArray(String paraName)
- Parameters:
- par=high,low - returns String[] i = String[2] with i[0]=high i[1]=low
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.
getStringArray
public String[] getStringArray(String paraName,
String deflt)
getAxis
public Axis getAxis(String paraName)
-
axis1=12,.004f,0.0f,time,sec
getAxis
public Axis getAxis(String paraName,
String deflt)
All Packages Class Hierarchy This Package Previous Next Index