public class Parameter
extends java.lang.Object
Parameter in a system configuration.
Each parameter has a list of values, which can be one of the three types,
boolean, integer, and enum. Type
enum is essentially a string type.
Each parameter has two IDs. Both IDs are automatically assigned by a
SUT object into which this parameter is added.
ID: This ID indicates the order of parameters as specified by the user.
ActiveID: This indicates the order of parameters covered by the IPOG
strategy, which reorders parameters as
needed to achieve optimal results.
| Modifier and Type | Field and Description |
|---|---|
static int |
PARAM_TYPE_BOOL
indicates a boolean parameter
|
static int |
PARAM_TYPE_ENUM
Indicates an enum parameter
|
static int |
PARAM_TYPE_INT
Indicates an integer parameter
|
| Constructor and Description |
|---|
Parameter(java.lang.String name)
Creates a new
Parameter with a given name. |
| Modifier and Type | Method and Description |
|---|---|
void |
addInvalidValue(java.lang.String value) |
void |
addValue(java.lang.String value)
Adds a valid value into the list of parameter values.
|
void |
clearValues()
Clears the valid values of the parameter.
|
int |
getActiveID()
Gets the active ID of the parameter.
|
int |
getBaseChoice(int index) |
java.util.ArrayList<java.lang.String> |
getBaseChoiceValues()
Gets the base choice values of this parameter.
|
java.lang.String |
getCommaDelimitedValues()
Gets a comma separated string representation of the parameter values.
|
int |
getDomainSize()
Gets the number of valid values of this parameter.
|
java.util.ArrayList<java.lang.String[]> |
getHiddenParamValues()
Get hidden parameter values.
|
int |
getID()
Gets the ID of the parameter.
|
int |
getIndex(java.lang.String value)
Gets the index of a given parameter valid value
|
int |
getInputOrOutput() |
java.lang.String |
getInvalidValue(int index) |
int |
getInvalidValueIndex(java.lang.String invalidValue) |
java.util.ArrayList<java.lang.String> |
getInvalidValues() |
java.lang.String |
getName()
Gets the parameter name.
|
int |
getNumOfBaseChoices()
Get the number of base choices.
|
java.lang.String |
getOutputParamname() |
java.lang.String |
getOutputValue(int index) |
java.util.ArrayList<java.lang.String> |
getOutputValues() |
int |
getParamType()
Gets the type of this parameter.
|
java.lang.String |
getValue(int index)
Gets the parameter valid value with a given index.
|
java.util.ArrayList<java.lang.String> |
getValues()
Gets the valid values of this parameter.
|
boolean |
isBaseChoice(int index) |
boolean |
isChangedDuringImport() |
boolean |
isFirstBaseChoice(int index) |
boolean |
isHiddenVariable() |
void |
setActiveID(int activeID)
Sets the active ID of the parameter.
|
void |
setBaseChoiceValues(java.util.ArrayList<java.lang.String> baseChoiceValues) |
void |
setChangedDuringImport(boolean isChangedDuringImport) |
void |
setHiddenParamValues(java.util.ArrayList<java.lang.String[]> hiddenParamValues) |
void |
setHiddenVariable(boolean hiddenVariable) |
void |
setID(int id)
Sets the ID of the parameter.
|
void |
setInputOrOutput(int inputOrOutput) |
void |
setInvalidValues(java.util.ArrayList<java.lang.String> invalidValues) |
void |
setName(java.lang.String nm) |
void |
setOutputParamname(java.lang.String outputParamname) |
void |
setOutputValues(java.util.ArrayList<java.lang.String> outputValues) |
void |
setType(int type)
Sets the type of this parameter.
|
void |
setValues(java.util.ArrayList<java.lang.String> values)
Sets the valid values of the parameter.
|
java.lang.String |
toString() |
public static final int PARAM_TYPE_INT
public static final int PARAM_TYPE_ENUM
public static final int PARAM_TYPE_BOOL
public Parameter(java.lang.String name)
Parameter with a given name.name - the name of the parameterpublic java.lang.String getName()
public void setID(int id)
id - the ID of the parameterpublic int getID()
public void setActiveID(int activeID)
activeID - the active ID of the parameterpublic int getActiveID()
public void addValue(java.lang.String value)
value - the valid value to be added.public java.lang.String getValue(int index)
index - the valid value index.public int getIndex(java.lang.String value)
value - public int getDomainSize()
public java.util.ArrayList<java.lang.String> getValues()
public void setValues(java.util.ArrayList<java.lang.String> values)
values - an array holding the valid values of this parameterpublic void clearValues()
public int getParamType()
public void setType(int type)
type - the type of this parameter.public java.util.ArrayList<java.lang.String> getBaseChoiceValues()
public boolean isBaseChoice(int index)
public boolean isFirstBaseChoice(int index)
public int getNumOfBaseChoices()
public int getBaseChoice(int index)
public void setBaseChoiceValues(java.util.ArrayList<java.lang.String> baseChoiceValues)
public int getInputOrOutput()
public void setInputOrOutput(int inputOrOutput)
public java.lang.String getOutputParamname()
public void setOutputParamname(java.lang.String outputParamname)
public java.util.ArrayList<java.lang.String> getOutputValues()
public void setOutputValues(java.util.ArrayList<java.lang.String> outputValues)
public java.lang.String getOutputValue(int index)
public boolean isChangedDuringImport()
public void setChangedDuringImport(boolean isChangedDuringImport)
public java.util.ArrayList<java.lang.String[]> getHiddenParamValues()
public void setHiddenParamValues(java.util.ArrayList<java.lang.String[]> hiddenParamValues)
public boolean isHiddenVariable()
public void setHiddenVariable(boolean hiddenVariable)
public java.lang.String toString()
toString in class java.lang.Objectpublic void setName(java.lang.String nm)
public java.lang.String getCommaDelimitedValues()
public java.util.ArrayList<java.lang.String> getInvalidValues()
public void setInvalidValues(java.util.ArrayList<java.lang.String> invalidValues)
public void addInvalidValue(java.lang.String value)
public java.lang.String getInvalidValue(int index)
public int getInvalidValueIndex(java.lang.String invalidValue)