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 classConstraintBuilder.Constraint1BuilderBuilder for giving a constraint on one parameter the correspondingBooleanFunction1.static classConstraintBuilder.Constraint2BuilderBuilder for giving a constraint on two parameters the correspondingBooleanFunction2.static classConstraintBuilder.Constraint3BuilderBuilder for giving a constraint on three parameters the correspondingBooleanFunction3.static classConstraintBuilder.Constraint4BuilderBuilder for giving a constraint on four parameters the correspondingBooleanFunction4.static classConstraintBuilder.Constraint5BuilderBuilder for giving a constraint on five parameters the correspondingBooleanFunction5.static classConstraintBuilder.Constraint6BuilderBuilder for giving a constraint on six parameters the correspondingBooleanFunction6.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConstraintBuilder.Constraint1Builderconstrain(String firstParameter)Starts the build process for a constraint on one parameter.static ConstraintBuilder.Constraint1Builderconstrain(String firstParameter, ConstraintStatus constraintStatus)static ConstraintBuilder.Constraint2Builderconstrain(String firstParameter, String secondParameter)Starts the build process for a constraint on two parameters.static ConstraintBuilder.Constraint2Builderconstrain(String firstParameter, String secondParameter, ConstraintStatus constraintStatus)static ConstraintBuilder.Constraint3Builderconstrain(String firstParameter, String secondParameter, String thirdParameter)Starts the build process for a constraint on three parameters.static ConstraintBuilder.Constraint3Builderconstrain(String firstParameter, String secondParameter, String thirdParameter, ConstraintStatus constraintStatus)static ConstraintBuilder.Constraint4Builderconstrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter)Starts the build process for a constraint on four parameters.static ConstraintBuilder.Constraint4Builderconstrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, ConstraintStatus constraintStatus)static ConstraintBuilder.Constraint5Builderconstrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter)Starts the build process for a constraint on five parameters.static ConstraintBuilder.Constraint5Builderconstrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, ConstraintStatus constraintStatus)static ConstraintBuilder.Constraint6Builderconstrain(String firstParameter, String secondParameter, String thirdParameter, String fourthParameter, String fifthParameter, String sixthParameter)Starts the build process for a constraint on sic parameters.static ConstraintBuilder.Constraint6Builderconstrain(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 benullsecondParameter- 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 benullsecondParameter- the name of the second parameter. Must not benullthirdParameter- 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 benullsecondParameter- the name of the second parameter. Must not benullthirdParameter- the name of the third parameter. Must not benullfourthParameter- 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 benullsecondParameter- the name of the second parameter. Must not benullthirdParameter- the name of the third parameter. Must not benullfourthParameter- the name of the fourth parameter. Must not benullfifthParameter- 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 benullsecondParameter- the name of the second parameter. Must not benullthirdParameter- the name of the third parameter. Must not benullfourthParameter- the name of the fourth parameter. Must not benullfifthParameter- the name of the fifth parameter. Must not benullsixthParameter- 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)
-
-