Package de.rwth.swc.coffee4j.model
Class InputParameterModel.Builder
- java.lang.Object
-
- de.rwth.swc.coffee4j.model.InputParameterModel.Builder
-
- Enclosing class:
- InputParameterModel
public static final class InputParameterModel.Builder extends java.lang.ObjectRealization of the builder pattern for constructing aInputParameterModel. Entry point isInputParameterModel.inputParameterModel(String).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputParameterModelbuild()Builds the testModel.InputParameterModel.BuildererrorConstraint(Constraint errorConstraint)Adds a error constraint to the testModel.InputParameterModel.BuildererrorConstraints(Constraint... errorConstraints)Adds all error constraints to the testModel.InputParameterModel.BuilderexclusionConstraint(Constraint exclusionConstraint)Adds a forbidden constraint to the testModel.InputParameterModel.BuilderexclusionConstraints(Constraint... exclusionConstraints)Adds all forbidden constraints to the testModel.InputParameterModel.Buildername(java.lang.String name)Sets the name.InputParameterModel.Builderparameter(Parameter parameter)Adds a parameter to the testModel.InputParameterModel.Builderparameter(Parameter.Builder parameter)Adds the parameter builders to the testModel by building them.InputParameterModel.Builderparameters(Parameter.Builder... parameters)Builds all given builders and adds the result parameters to the testModel.InputParameterModel.Builderparameters(Parameter... parameters)Adds all parameters to the testModel.InputParameterModel.Builderstrength(int strength)Stets the testing strength.
-
-
-
Method Detail
-
strength
public InputParameterModel.Builder strength(int strength)
Stets the testing strength. Default is one.- Parameters:
strength- the testing strength- Returns:
- this
-
name
public InputParameterModel.Builder name(java.lang.String name)
Sets the name. This may not benullwhenbuild()is called.- Parameters:
name- a descriptive name for the testModel- Returns:
- this
-
parameter
public InputParameterModel.Builder parameter(Parameter parameter)
Adds a parameter to the testModel.- Parameters:
parameter- the parameter. Must not benull- Returns:
- this
-
parameter
public InputParameterModel.Builder parameter(Parameter.Builder parameter)
Adds the parameter builders to the testModel by building them. This is a convenience method as now the user does not have to callParameter.Builder.build()himself, therefore creating more readable code.- Parameters:
parameter- the parameter to be build. Must not benull- Returns:
- this
-
parameters
public InputParameterModel.Builder parameters(Parameter... parameters)
Adds all parameters to the testModel.- Parameters:
parameters- all parameters to be added. Must not be, nor containnull- Returns:
- this
-
parameters
public InputParameterModel.Builder parameters(Parameter.Builder... parameters)
Builds all given builders and adds the result parameters to the testModel.- Parameters:
parameters- the parameters to be added. Must not be, nor containnull- Returns:
- this
-
exclusionConstraint
public InputParameterModel.Builder exclusionConstraint(Constraint exclusionConstraint)
Adds a forbidden constraint to the testModel.- Parameters:
exclusionConstraint- the forbidden constraint to be added. Must not benull- Returns:
- this
-
exclusionConstraints
public InputParameterModel.Builder exclusionConstraints(Constraint... exclusionConstraints)
Adds all forbidden constraints to the testModel.- Parameters:
exclusionConstraints- the forbidden constraints to be added. Must not be, nor containnull- Returns:
- this
-
errorConstraint
public InputParameterModel.Builder errorConstraint(Constraint errorConstraint)
Adds a error constraint to the testModel.- Parameters:
errorConstraint- the error constraint to be added. Must not benull- Returns:
- this
-
errorConstraints
public InputParameterModel.Builder errorConstraints(Constraint... errorConstraints)
Adds all error constraints to the testModel.- Parameters:
errorConstraints- the error constraints to be added. Must not be, nor containnull- Returns:
- this
-
build
public InputParameterModel build()
Builds the testModel. Add least one parameter needs to have been added by now.- Returns:
- the constructed testModel
-
-