public class RandomIntIntervalGenerator extends ChoiceGeneratorBase<Integer> implements IntChoiceGenerator
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected int |
max |
protected int |
min |
protected int |
nChoices |
protected int |
next |
protected Random |
random |
protected int |
range |
protected long |
seed |
attr, id, idRef, insn, isCascaded, isDone, MARKER, prev, ti| Constructor and Description |
|---|
RandomIntIntervalGenerator(Config conf,
String id) |
RandomIntIntervalGenerator(String id,
int min,
int max,
int nChoices) |
RandomIntIntervalGenerator(String id,
int min,
int max,
int nChoices,
long seed) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance()
advance to the next choice.
|
Class<Integer> |
getChoiceType() |
Integer |
getNextChoice() |
int |
getProcessedNumberOfChoices() |
int |
getTotalNumberOfChoices() |
boolean |
hasMoreChoices() |
ChoiceGenerator<Integer> |
randomize()
turn the order of choices random (if it isn't already).
|
void |
reset()
this has to reset the CG to its initial state, which includes resetting
'isDone'
|
String |
toString() |
addAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getSourceLocation, getThreadInfo, hasAttr, hasAttr, hasAttrValue, init, isCascaded, isDone, isProcessed, isSchedulingPoint, removeAttr, reorder, replaceAttr, select, setAttr, setCascaded, setContext, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setThreadInfo, supportsReordering, useRandomizationequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getSourceLocation, getThreadInfo, hasAttr, hasAttr, isCascaded, isDone, isProcessed, isSchedulingPoint, removeAttr, reorder, replaceAttr, select, setAttr, setCascaded, setContext, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setThreadInfo, supportsReorderingprotected int min
protected int max
protected int nChoices
protected long seed
protected Random random
protected int range
protected int next
protected int count
public RandomIntIntervalGenerator(String id, int min, int max, int nChoices)
public RandomIntIntervalGenerator(String id, int min, int max, int nChoices, long seed)
public void reset()
ChoiceGeneratorreset in interface ChoiceGenerator<Integer>public boolean hasMoreChoices()
hasMoreChoices in interface ChoiceGenerator<Integer>public void advance()
ChoiceGeneratoradvance in interface ChoiceGenerator<Integer>public Integer getNextChoice()
getNextChoice in interface ChoiceGenerator<Integer>public int getTotalNumberOfChoices()
getTotalNumberOfChoices in interface ChoiceGenerator<Integer>public int getProcessedNumberOfChoices()
getProcessedNumberOfChoices in interface ChoiceGenerator<Integer>public String toString()
toString in class ChoiceGeneratorBase<Integer>public Class<Integer> getChoiceType()
getChoiceType in interface ChoiceGenerator<Integer>public ChoiceGenerator<Integer> randomize()
ChoiceGeneratorrandomize in interface ChoiceGenerator<Integer>randomize in class ChoiceGeneratorBase<Integer>