Class ConstraintBuilder


  • public final class ConstraintBuilder
    extends java.lang.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 a BooleanFunction1 (with the corresponding number at the end) is required as a constraint function.
    • Method Detail

      • constrain

        public static ConstraintBuilder.Constraint1Builder constrain​(java.lang.String firstParameter)
        Starts the build process for a constraint on one parameter.
        Parameters:
        firstParameter - the name of the first parameter. Must not be null
        Returns:
        a builder for defining the corresponding ConstraintFunction
      • constrain

        public static ConstraintBuilder.Constraint2Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter)
        Starts the build process for a constraint on two parameters.
        Parameters:
        firstParameter - the name of the first parameter. Must not be null
        secondParameter - the name of the second parameter. Must not be null
        Returns:
        a builder for defining the corresponding ConstraintFunction
      • constrain

        public static ConstraintBuilder.Constraint3Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter,
                                                                     java.lang.String thirdParameter)
        Starts the build process for a constraint on three parameters.
        Parameters:
        firstParameter - the name of the first parameter. Must not be null
        secondParameter - the name of the second parameter. Must not be null
        thirdParameter - the name of the third parameter. Must not be null
        Returns:
        a builder for defining the corresponding ConstraintFunction
      • constrain

        public static ConstraintBuilder.Constraint4Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter,
                                                                     java.lang.String thirdParameter,
                                                                     java.lang.String fourthParameter)
        Starts the build process for a constraint on four parameters.
        Parameters:
        firstParameter - the name of the first parameter. Must not be null
        secondParameter - the name of the second parameter. Must not be null
        thirdParameter - the name of the third parameter. Must not be null
        fourthParameter - the name of the fourth parameter. Must not be null
        Returns:
        a builder for defining the corresponding ConstraintFunction
      • constrain

        public static ConstraintBuilder.Constraint5Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter,
                                                                     java.lang.String thirdParameter,
                                                                     java.lang.String fourthParameter,
                                                                     java.lang.String fifthParameter)
        Starts the build process for a constraint on five parameters.
        Parameters:
        firstParameter - the name of the first parameter. Must not be null
        secondParameter - the name of the second parameter. Must not be null
        thirdParameter - the name of the third parameter. Must not be null
        fourthParameter - the name of the fourth parameter. Must not be null
        fifthParameter - the name of the fifth parameter. Must not be null
        Returns:
        a builder for defining the corresponding ConstraintFunction
      • constrain

        public static ConstraintBuilder.Constraint5Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter,
                                                                     java.lang.String thirdParameter,
                                                                     java.lang.String fourthParameter,
                                                                     java.lang.String fifthParameter,
                                                                     ConstraintStatus constraintStatus)
      • constrain

        public static ConstraintBuilder.Constraint6Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter,
                                                                     java.lang.String thirdParameter,
                                                                     java.lang.String fourthParameter,
                                                                     java.lang.String fifthParameter,
                                                                     java.lang.String sixthParameter)
        Starts the build process for a constraint on sic parameters.
        Parameters:
        firstParameter - the name of the first parameter. Must not be null
        secondParameter - the name of the second parameter. Must not be null
        thirdParameter - the name of the third parameter. Must not be null
        fourthParameter - the name of the fourth parameter. Must not be null
        fifthParameter - the name of the fifth parameter. Must not be null
        sixthParameter - the name of the sixth parameter. Must not be null
        Returns:
        a builder for defining the corresponding ConstraintFunction
      • constrain

        public static ConstraintBuilder.Constraint6Builder constrain​(java.lang.String firstParameter,
                                                                     java.lang.String secondParameter,
                                                                     java.lang.String thirdParameter,
                                                                     java.lang.String fourthParameter,
                                                                     java.lang.String fifthParameter,
                                                                     java.lang.String sixthParameter,
                                                                     ConstraintStatus constraintStatus)