|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.flow.PluginFor
public class PluginFor
Performs a indexed loop.
Example:
Check the square and cubic roots from 0 to 10, with step 2:
n square cubic ${index} ${index * index} ${index * index * index}
The CSS annotated version:
Check the square and cubic roots from
0 to 10, with step 2:
<table border=1>
<tr>
<th>n</th>
<th>square</th>
<th>cubic</th>
</tr>
<tbody class="for" min=0 max=10 step=2 var=any>
<tr>
<td>${any}</td>
<td>${any * any}</td>
<td>${any * any * any}</td>
</tr>
<tbody>
</table>
| Field Summary | |
|---|---|
protected Integer |
max
Maximum value. |
protected int |
min
Minimum value. |
protected int |
step
Step. |
protected String |
var
Index variable name. |
| Fields inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT |
| Constructor Summary | |
|---|---|
PluginFor()
|
|
| Method Summary | |
|---|---|
ENext |
doStart(IContext context,
IResultSet result)
Performs the start action. i.e. create a database schema. |
ActionType |
getActionType()
Get the plugin type. |
Integer |
getMax()
Gets the ending index. |
int |
getMin()
Gets the starting index. |
int |
getStep()
Gets the index jumping step. |
String |
getVar()
The index variable name. |
void |
setMax(Integer max)
Set the last valid index. |
void |
setMin(int min)
Set the starting index. |
void |
setStep(int step)
Change index jumping step. |
void |
setVar(String var)
Change the variable name. |
| Methods inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
copy, doEnd, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, initialize, setCondition, setConditionModel, setNormalized, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toString |
| Methods inherited from class org.specrunner.parameters.core.ParameterHolder |
|---|
getParameters, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.specrunner.parameters.IParameterHolder |
|---|
getParameters, setParameters |
| Field Detail |
|---|
protected String var
protected int min
protected Integer max
protected int step
| Constructor Detail |
|---|
public PluginFor()
| Method Detail |
|---|
public String getVar()
public void setVar(String var)
var - The variable.public int getMin()
public void setMin(int min)
min - The starting.public Integer getMax()
public void setMax(Integer max)
max - The new last index.public int getStep()
public void setStep(int step)
step - The step.public ActionType getActionType()
IActionType
public ENext doStart(IContext context,
IResultSet result)
throws PluginException
IPlugin
doStart in interface IPlugindoStart in class AbstractPlugincontext - The context.result - The result set.
PluginException - On execution errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||