Class StrengthGroup.Builder
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.configuration.model.StrengthGroup.Builder
-
- Enclosing class:
- StrengthGroup
public static final class StrengthGroup.Builder extends Object
Class which realizes the builder pattern for constructing a newStrengthGroup
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StrengthGroup
build(Collection<Parameter> parameters)
Builds theStrengthGroup
with the information given to the builder.StrengthGroup.Builder
ofHighestStrength()
Specifies that the group of parameters should be tested to the highest possible strength.StrengthGroup.Builder
ofStrength(int strength)
Specifies an explicit strength to which the parameters in the group should be tested.
-
-
-
Method Detail
-
ofHighestStrength
public StrengthGroup.Builder ofHighestStrength()
Specifies that the group of parameters should be tested to the highest possible strength. This means that the strength will be the number of parameters in the group (e.g. if there are three parameters, the strength will also be three, so the cartesian product of the parameter will appear in the final test suite).- Returns:
- this
-
ofStrength
public StrengthGroup.Builder ofStrength(int strength)
Specifies an explicit strength to which the parameters in the group should be tested. This needs to be at least zero and at most the number of parameters.- Parameters:
strength
- the strength at which to test the parameter group. Must be at greater than or equal to zero and at most the number of parameters- Returns:
- this
-
build
public StrengthGroup build(Collection<Parameter> parameters)
Builds theStrengthGroup
with the information given to the builder. It attempts to replace each parameter name by the correctParameter
instance. If no instance matches the given name, an exception is thrown.- Parameters:
parameters
- the parameter for substitution. Must not benull
and contain exactly one parameter with the given name for each parameter name given to the builder- Returns:
- the created group with the parameters corresponding to the given names and the given strength
-
-