public class IntIntervalGenerator extends ChoiceGeneratorBase<java.lang.Integer> implements IntChoiceGenerator
Modifier and Type | Field and Description |
---|---|
protected int |
delta |
protected int |
max |
protected int |
min |
protected int |
next |
Constructor and Description |
---|
IntIntervalGenerator(Config conf,
java.lang.String id) |
IntIntervalGenerator(int min,
int max)
Deprecated.
|
IntIntervalGenerator(int min,
int max,
int delta)
Deprecated.
|
IntIntervalGenerator(java.lang.String id,
int min,
int max) |
IntIntervalGenerator(java.lang.String id,
int min,
int max,
int delta) |
Modifier and Type | Method and Description |
---|---|
void |
advance()
advance to the next choice.
|
java.lang.Integer |
getChoice(int idx)
explicit choice enumeration.
|
java.lang.Integer[] |
getChoices() |
java.lang.Class<java.lang.Integer> |
getChoiceType() |
java.lang.Integer |
getNextChoice() |
int |
getProcessedNumberOfChoices() |
int |
getTotalNumberOfChoices() |
boolean |
hasMoreChoices() |
boolean |
isAscending() |
ChoiceGenerator<java.lang.Integer> |
randomize()
turn the order of choices random (if it isn't already).
|
ChoiceGenerator<java.lang.Integer> |
reorder(java.util.Comparator<java.lang.Integer> comparator)
reorder according to a user provided comparator
|
void |
reset()
this has to reset the CG to its initial state, which includes resetting
'isDone'
|
void |
reverse()
note this should only be called before the CG is advanced since it resets
the enumeration state
|
boolean |
supportsReordering() |
java.lang.String |
toString() |
addAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllChoices, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getNumberOfParents, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getProcessedChoices, getSourceLocation, getStateId, getThreadInfo, getUnprocessedChoices, hasAttr, hasAttr, hasAttrValue, init, isCascaded, isDone, isProcessed, isSchedulingPoint, removeAttr, replaceAttr, select, setAttr, setCascaded, setContext, setCurrent, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setStateId, setThreadInfo, useRandomization
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllChoices, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getNumberOfParents, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getProcessedChoices, getSourceLocation, getStateId, getThreadInfo, getUnprocessedChoices, hasAttr, hasAttr, isCascaded, isDone, isProcessed, isSchedulingPoint, removeAttr, replaceAttr, select, setAttr, setCascaded, setContext, setCurrent, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setStateId, setThreadInfo
protected int min
protected int max
protected int next
protected int delta
@Deprecated public IntIntervalGenerator(int min, int max)
@Deprecated public IntIntervalGenerator(int min, int max, int delta)
public IntIntervalGenerator(java.lang.String id, int min, int max, int delta)
public IntIntervalGenerator(java.lang.String id, int min, int max)
public IntIntervalGenerator(Config conf, java.lang.String id)
public void reset()
ChoiceGenerator
reset
in interface ChoiceGenerator<java.lang.Integer>
public java.lang.Integer getChoice(int idx)
ChoiceGeneratorBase
getChoice
in interface ChoiceGenerator<java.lang.Integer>
getChoice
in class ChoiceGeneratorBase<java.lang.Integer>
public java.lang.Integer getNextChoice()
getNextChoice
in interface ChoiceGenerator<java.lang.Integer>
public boolean hasMoreChoices()
hasMoreChoices
in interface ChoiceGenerator<java.lang.Integer>
public void advance()
ChoiceGenerator
advance
in interface ChoiceGenerator<java.lang.Integer>
public int getTotalNumberOfChoices()
getTotalNumberOfChoices
in interface ChoiceGenerator<java.lang.Integer>
public int getProcessedNumberOfChoices()
getProcessedNumberOfChoices
in interface ChoiceGenerator<java.lang.Integer>
public boolean isAscending()
public void reverse()
public java.lang.Integer[] getChoices()
public boolean supportsReordering()
supportsReordering
in interface ChoiceGenerator<java.lang.Integer>
supportsReordering
in class ChoiceGeneratorBase<java.lang.Integer>
public ChoiceGenerator<java.lang.Integer> reorder(java.util.Comparator<java.lang.Integer> comparator)
ChoiceGeneratorBase
reorder
in interface ChoiceGenerator<java.lang.Integer>
reorder
in class ChoiceGeneratorBase<java.lang.Integer>
public java.lang.String toString()
toString
in class ChoiceGeneratorBase<java.lang.Integer>
public java.lang.Class<java.lang.Integer> getChoiceType()
getChoiceType
in interface ChoiceGenerator<java.lang.Integer>
public ChoiceGenerator<java.lang.Integer> randomize()
ChoiceGenerator
randomize
in interface ChoiceGenerator<java.lang.Integer>
randomize
in class ChoiceGeneratorBase<java.lang.Integer>