Class ConstraintBuilder
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.configuration.model.constraints.ConstraintBuilder
-
public final class ConstraintBuilder extends Object
Convenience methods for creating constraints on up to six parameters. For all numbers of parameters this works by the same schema. First, a number of parameters is given, then aBooleanFunction1
(with the corresponding number at the end) is required as a constraint function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConstraintBuilder.Constraint1Builder
Builder for giving a constraint on one parameter the correspondingBooleanFunction1
.static class
ConstraintBuilder.Constraint2Builder
Builder for giving a constraint on two parameters the correspondingBooleanFunction2
.static class
ConstraintBuilder.Constraint3Builder
Builder for giving a constraint on three parameters the correspondingBooleanFunction3
.static class
ConstraintBuilder.Constraint4Builder
Builder for giving a constraint on four parameters the correspondingBooleanFunction4
.static class
ConstraintBuilder.Constraint5Builder
Builder for giving a constraint on five parameters the correspondingBooleanFunction5
.static class
ConstraintBuilder.Constraint6Builder
Builder for giving a constraint on six parameters the correspondingBooleanFunction6
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConstraintBuilder.Constraint1Builder
constrain(String firstParameter)
Starts the build process for a constraint on one parameter.static ConstraintBuilder.Constraint1Builder
constrain(String firstParameter, ConstraintStatus constraintStatus)
static ConstraintBuilder.Constraint2Builder
constrain(String firstParameter, String secondParameter)
Starts the build process for a constraint on two parameters.static ConstraintBuilder.Constraint2Builder
constrain(String firstParameter, String secondParameter, ConstraintStatus constraintStatus)
static ConstraintBuilder.Constraint3Builder
constrain(String firstParameter, String secondParameter, String thirdParameter)
Starts the build process for a constraint on three parameters.static ConstraintBuilder.Constraint3Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, ConstraintStatus constraintStatus)
static ConstraintBuilder.Constraint4Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter)
Starts the build process for a constraint on four parameters.static ConstraintBuilder.Constraint4Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, ConstraintStatus constraintStatus)
static ConstraintBuilder.Constraint5Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter)
Starts the build process for a constraint on five parameters.static ConstraintBuilder.Constraint5Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, ConstraintStatus constraintStatus)
static ConstraintBuilder.Constraint6Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, String sixthParameter)
Starts the build process for a constraint on sic parameters.static ConstraintBuilder.Constraint6Builder
constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, String sixthParameter, ConstraintStatus constraintStatus)
-
-
-
Method Detail
-
constrain
public static ConstraintBuilder.Constraint1Builder constrain(String firstParameter)
Starts the build process for a constraint on one parameter.- Parameters:
firstParameter
- the name of the first parameter. Must not benull
- Returns:
- a builder for defining the corresponding
ConstraintFunction
-
constrain
public static ConstraintBuilder.Constraint1Builder constrain(String firstParameter, ConstraintStatus constraintStatus)
-
constrain
public static ConstraintBuilder.Constraint2Builder constrain(String firstParameter, String secondParameter)
Starts the build process for a constraint on two parameters.- Parameters:
firstParameter
- the name of the first parameter. Must not benull
secondParameter
- the name of the second parameter. Must not benull
- Returns:
- a builder for defining the corresponding
ConstraintFunction
-
constrain
public static ConstraintBuilder.Constraint2Builder constrain(String firstParameter, String secondParameter, ConstraintStatus constraintStatus)
-
constrain
public static ConstraintBuilder.Constraint3Builder constrain(String firstParameter, String secondParameter, String thirdParameter)
Starts the build process for a constraint on three parameters.- Parameters:
firstParameter
- the name of the first parameter. Must not benull
secondParameter
- the name of the second parameter. Must not benull
thirdParameter
- the name of the third parameter. Must not benull
- Returns:
- a builder for defining the corresponding
ConstraintFunction
-
constrain
public static ConstraintBuilder.Constraint3Builder constrain(String firstParameter, String secondParameter, String thirdParameter, ConstraintStatus constraintStatus)
-
constrain
public static ConstraintBuilder.Constraint4Builder constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter)
Starts the build process for a constraint on four parameters.- Parameters:
firstParameter
- the name of the first parameter. Must not benull
secondParameter
- the name of the second parameter. Must not benull
thirdParameter
- the name of the third parameter. Must not benull
fourthParameter
- the name of the fourth parameter. Must not benull
- Returns:
- a builder for defining the corresponding
ConstraintFunction
-
constrain
public static ConstraintBuilder.Constraint4Builder constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, ConstraintStatus constraintStatus)
-
constrain
public static ConstraintBuilder.Constraint5Builder constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter)
Starts the build process for a constraint on five parameters.- Parameters:
firstParameter
- the name of the first parameter. Must not benull
secondParameter
- the name of the second parameter. Must not benull
thirdParameter
- the name of the third parameter. Must not benull
fourthParameter
- the name of the fourth parameter. Must not benull
fifthParameter
- the name of the fifth parameter. Must not benull
- Returns:
- a builder for defining the corresponding
ConstraintFunction
-
constrain
public static ConstraintBuilder.Constraint5Builder constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, ConstraintStatus constraintStatus)
-
constrain
public static ConstraintBuilder.Constraint6Builder constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, String sixthParameter)
Starts the build process for a constraint on sic parameters.- Parameters:
firstParameter
- the name of the first parameter. Must not benull
secondParameter
- the name of the second parameter. Must not benull
thirdParameter
- the name of the third parameter. Must not benull
fourthParameter
- the name of the fourth parameter. Must not benull
fifthParameter
- the name of the fifth parameter. Must not benull
sixthParameter
- the name of the sixth parameter. Must not benull
- Returns:
- a builder for defining the corresponding
ConstraintFunction
-
constrain
public static ConstraintBuilder.Constraint6Builder constrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, String sixthParameter, ConstraintStatus constraintStatus)
-
-