|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectex1.ParamDef
This class is a generic parameter class, used for both the crops and operations which hols all information about a parameter except the data value.
Field Summary | |
float |
addEnd
|
java.lang.String |
altUnits
|
java.util.ArrayList |
choices
|
float |
factor
|
java.lang.String |
name
|
java.lang.String |
prompt
|
java.lang.String |
units
|
Constructor Summary | |
ParamDef()
Construct a new ParamDef class |
Method Summary | |
java.lang.String |
findChoiceString(int ind)
Get the choice string associated with a specific value |
int |
findChoiceVal(java.lang.String ch)
Get the value assigned to a specific choice list element |
java.lang.String |
getAltRevValue(java.lang.String pstr)
This function converts a alternate value to its base value. |
java.lang.String |
getAltValue(java.lang.String pstr)
This function converts a base value into an alternate (english) unit representation if the parameter has a factor field and an optional addEnd field. |
java.lang.String |
getPseudoVal()
Get a very basic default value based on the field type |
int |
getType()
Get the type of the parameter. |
void |
setType(int val)
Set the type of the parameter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String name
public java.lang.String prompt
public java.lang.String units
public java.lang.String altUnits
public float factor
public float addEnd
public java.util.ArrayList choices
Constructor Detail |
public ParamDef()
Method Detail |
public java.lang.String getAltValue(java.lang.String pstr)
pstr
- String to convert to the alternate unit representation.public java.lang.String getAltRevValue(java.lang.String pstr)
pstr
- String to convert that may be in alternate units. If a parameter does not have an
alternate unit representation setup the orginal string is returned (no conversion necessary).
public void setType(int val)
val
- 0,1,2,3 for float, int , string, choice listpublic int getType()
public int findChoiceVal(java.lang.String ch)
ch
- the choice string to find
public java.lang.String findChoiceString(int ind)
ind
- value to search for
public java.lang.String getPseudoVal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |