sofya.mutator
Interface MutationSelector

All Known Implementing Classes:
DefaultMutationSelector, IDMutationSelector, MethodMutationSelector, OperatorMutationSelector, RandomIDMutationSelector, RandomMethodMutationSelector, RandomOperatorMutationSelector

public interface MutationSelector

A mutation selector selects mutatations from a mutation table according to some criteria.

Version:
05/12/2006
Author:
Alex Kinneer

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).
 

Method Detail

isSelected

boolean isSelected(Mutation mutation)
Reports whether a mutation is selected.

Parameters:
mutation - Mutation to be checked for selection.
Returns:
true if this selector implements a selection criteria that the given mutation meets, false otherwise.

getVariant

Mutation.Variant getVariant(Mutation mutation)
Gets the selected variant.

Some mutation operators, such as the arithmetic operator change (AOP), generate multiple variants at a single location.

Parameters:
mutation - Mutation for which to retrieve the selected variant.
Returns:
The selected mutation variant.

setMutationCount

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).

This is useful for some selectors, such as those that implement random selection criteria.

Parameters:
count - Total number of mutations from which this selector may select.