public class ThreadChoiceFromSet extends ChoiceGeneratorBase<ThreadInfo> implements ThreadChoiceGenerator
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected boolean |
isSchedulingPoint |
protected ThreadInfo[] |
values |
| Constructor and Description |
|---|
ThreadChoiceFromSet(String id,
ThreadInfo[] set,
boolean isSchedulingPoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance()
this has to handle timeouts, which we do with temporary thread status
changes (i.e.
|
boolean |
contains(ThreadInfo ti) |
ThreadInfo[] |
getAllThreadChoices() |
ThreadInfo[] |
getChoices() |
Class<ThreadInfo> |
getChoiceType() |
ThreadInfo |
getNextChoice() |
Object |
getNextChoiceObject() |
int |
getProcessedNumberOfChoices() |
int |
getTotalNumberOfChoices() |
boolean |
hasMoreChoices() |
boolean |
isSchedulingPoint() |
void |
printOn(PrintWriter pw) |
ThreadChoiceFromSet |
randomize()
turn the order of choices random (if it isn't already).
|
ThreadChoiceGenerator |
reorder(Comparator<ThreadInfo> comparator)
reorder according to a user provided comparator
|
void |
reset()
this has to reset the CG to its initial state, which includes resetting
'isDone'
|
boolean |
supportsReordering() |
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, removeAttr, replaceAttr, select, setAttr, setCascaded, setContext, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setThreadInfo, toString, 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, removeAttr, replaceAttr, select, setAttr, setCascaded, setContext, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setThreadInfoprotected boolean isSchedulingPoint
protected ThreadInfo[] values
protected int count
public ThreadChoiceFromSet(String id, ThreadInfo[] set, boolean isSchedulingPoint)
public void reset()
ChoiceGeneratorreset in interface ChoiceGenerator<ThreadInfo>public ThreadInfo getNextChoice()
getNextChoice in interface ChoiceGenerator<ThreadInfo>public boolean hasMoreChoices()
hasMoreChoices in interface ChoiceGenerator<ThreadInfo>public void advance()
advance in interface ChoiceGenerator<ThreadInfo>public int getTotalNumberOfChoices()
getTotalNumberOfChoices in interface ChoiceGenerator<ThreadInfo>public int getProcessedNumberOfChoices()
getProcessedNumberOfChoices in interface ChoiceGenerator<ThreadInfo>public Object getNextChoiceObject()
public ThreadInfo[] getChoices()
public boolean supportsReordering()
supportsReordering in interface ChoiceGenerator<ThreadInfo>supportsReordering in class ChoiceGeneratorBase<ThreadInfo>public ThreadChoiceGenerator reorder(Comparator<ThreadInfo> comparator)
ChoiceGeneratorBasereorder in interface ChoiceGenerator<ThreadInfo>reorder in class ChoiceGeneratorBase<ThreadInfo>public void printOn(PrintWriter pw)
printOn in interface ThreadChoiceGeneratorpublic ThreadChoiceFromSet randomize()
ChoiceGeneratorrandomize in interface ChoiceGenerator<ThreadInfo>randomize in class ChoiceGeneratorBase<ThreadInfo>public ThreadInfo[] getAllThreadChoices()
public boolean contains(ThreadInfo ti)
contains in interface ThreadChoiceGeneratorpublic Class<ThreadInfo> getChoiceType()
getChoiceType in interface ChoiceGenerator<ThreadInfo>public boolean isSchedulingPoint()
isSchedulingPoint in interface ChoiceGenerator<ThreadInfo>isSchedulingPoint in class ChoiceGeneratorBase<ThreadInfo>