|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.mutator.selectors.IDMutationSelector
public class IDMutationSelector
Mutation selector that selects by ID.
Nested Class Summary | |
---|---|
static class |
IDMutationSelector.ID
Utility class to correlate mutants with selected variants. |
Constructor Summary | |
---|---|
IDMutationSelector(IDMutationSelector.ID[] ids)
Creates a new mutation selector. |
|
IDMutationSelector(gnu.trove.TIntIntHashMap ids)
Creates a new mutation selector. |
Method Summary | |
---|---|
Mutation.Variant |
getVariant(Mutation mutation)
Gets the selected variant. |
boolean |
isSelected(Mutation mutation)
Reports whether a mutation is selected. |
void |
setMutationCount(int count)
Sets the total number of mutations that may be passed to this selector (typically the number of mutations in a mutation table). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IDMutationSelector(IDMutationSelector.ID[] ids)
ids
- Array of selected IDs.public IDMutationSelector(gnu.trove.TIntIntHashMap ids)
ids
- Set of selected IDs, where each selected mutant
is mapped to a selected variant, if applicable.Method Detail |
---|
public boolean isSelected(Mutation mutation)
MutationSelector
isSelected
in interface MutationSelector
mutation
- Mutation to be checked for selection.
true
if this selector implements a selection
criteria that the given mutation meets, false
otherwise.public Mutation.Variant getVariant(Mutation mutation)
MutationSelector
Some mutation operators, such as the arithmetic operator change (AOP), generate multiple variants at a single location.
getVariant
in interface MutationSelector
mutation
- Mutation for which to retrieve the selected variant.
public void setMutationCount(int count)
MutationSelector
This is useful for some selectors, such as those that implement random selection criteria.
setMutationCount
in interface MutationSelector
count
- Total number of mutations from which this selector
may select.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |