public class EventChoiceGenerator extends ChoiceGeneratorBase<Event>
| Modifier and Type | Field and Description |
|---|---|
protected Event |
base |
protected EventContext |
ctx |
protected Event |
cur |
protected int |
nProcessed |
| Constructor and Description |
|---|
EventChoiceGenerator(java.lang.String id,
Event base) |
EventChoiceGenerator(java.lang.String id,
Event base,
EventContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChoice(Event newEvent) |
void |
advance()
advance to the next choice.
|
boolean |
containsMatchingChoice(Predicate<Event> predicate) |
Event[] |
getAllChoices() |
Event |
getChoice(int idx)
explicit choice enumeration.
|
java.lang.Class<Event> |
getChoiceType() |
protected Event[] |
getFirstNChoices(int n) |
static EventChoiceGenerator |
getNext(SystemState ss,
java.lang.String id,
Event base,
EventContext ctx)
convenience method to get successors from current CG chain
|
Event |
getNextChoice() |
Event[] |
getProcessedChoices() |
int |
getProcessedNumberOfChoices() |
EventChoiceGenerator |
getSuccessor(java.lang.String id) |
EventChoiceGenerator |
getSuccessor(java.lang.String id,
EventContext ctx) |
int |
getTotalNumberOfChoices() |
Event[] |
getUnprocessedChoices() |
boolean |
hasMoreChoices() |
void |
reset()
this has to reset the CG to its initial state, which includes resetting
'isDone'
|
void |
setContextExpander(EventContext ctx) |
java.lang.String |
toString() |
addAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getNumberOfParents, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getSourceLocation, getStateId, getThreadInfo, hasAttr, hasAttr, hasAttrValue, init, isCascaded, isDone, isProcessed, isSchedulingPoint, randomize, removeAttr, reorder, replaceAttr, select, setAttr, setCascaded, setContext, setCurrent, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setStateId, setThreadInfo, supportsReordering, useRandomizationprotected Event base
protected Event cur
protected int nProcessed
protected EventContext ctx
public EventChoiceGenerator(java.lang.String id,
Event base)
public EventChoiceGenerator(java.lang.String id,
Event base,
EventContext ctx)
public static EventChoiceGenerator getNext(SystemState ss, java.lang.String id, Event base, EventContext ctx)
public Event getChoice(int idx)
ChoiceGeneratorBasegetChoice in interface ChoiceGenerator<Event>getChoice in class ChoiceGeneratorBase<Event>public void setContextExpander(EventContext ctx)
public void addChoice(Event newEvent)
public EventChoiceGenerator getSuccessor(java.lang.String id)
public EventChoiceGenerator getSuccessor(java.lang.String id, EventContext ctx)
public Event getNextChoice()
public boolean hasMoreChoices()
public void advance()
ChoiceGeneratorpublic void reset()
ChoiceGeneratorpublic int getTotalNumberOfChoices()
public int getProcessedNumberOfChoices()
public java.lang.String toString()
toString in class ChoiceGeneratorBase<Event>public java.lang.Class<Event> getChoiceType()
protected Event[] getFirstNChoices(int n)
public Event[] getAllChoices()
getAllChoices in interface ChoiceGenerator<Event>getAllChoices in class ChoiceGeneratorBase<Event>public Event[] getProcessedChoices()
getProcessedChoices in interface ChoiceGenerator<Event>getProcessedChoices in class ChoiceGeneratorBase<Event>public Event[] getUnprocessedChoices()
getUnprocessedChoices in interface ChoiceGenerator<Event>getUnprocessedChoices in class ChoiceGeneratorBase<Event>