Interface ConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,​Solution_>

  • All Known Implementing Classes:
    DefaultConstraintVerifier

    public interface ConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,​Solution_>
    • Method Detail

      • build

        static <ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,​Solution_> ConstraintVerifier<ConstraintProvider_,​Solution_> build​(ConstraintProvider_ constraintProvider,
                                                                                                                                                                                    Class<Solution_> planningSolutionClass,
                                                                                                                                                                                    Class<?>... entityClasses)
        Entry point to the API.
        Type Parameters:
        ConstraintProvider_ - type of the ConstraintProvider
        Solution_ - type of the PlanningSolution-annotated class
        Parameters:
        constraintProvider - never null, PlanningEntity used by the PlanningSolution
        planningSolutionClass - never null, PlanningSolution-annotated class associated with the constraints
        entityClasses - never null, at least one, PlanningEntity types used by the PlanningSolution
        Returns:
        never null
      • verifyThat

        SingleConstraintVerification<Solution_> verifyThat​(BiFunction<ConstraintProvider_,​org.optaplanner.core.api.score.stream.ConstraintFactory,​org.optaplanner.core.api.score.stream.Constraint> constraintFunction)
        Creates a constraint verifier for a given Constraint of the ConstraintProvider.
        Parameters:
        constraintFunction - never null
        Returns:
        never null