Interface ConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_> 
- Type Parameters:
- ConstraintProvider_-
- Solution_-
- All Known Implementing Classes:
- DefaultConstraintVerifier
public interface ConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_> 
Implementations must be thread-safe, in order to enable parallel test execution.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <ConstraintProvider_ extends ConstraintProvider,Solution_> 
 ConstraintVerifier<ConstraintProvider_,Solution_> build(ConstraintProvider_ constraintProvider, Class<Solution_> planningSolutionClass, Class<?>... entityClasses) Entry point to the API.static <ConstraintProvider_ extends ConstraintProvider,Solution_> 
 ConstraintVerifier<ConstraintProvider_,Solution_> create(SolverConfig solverConfig) Uses aSolverConfigto build aConstraintVerifier.Creates a constraint verifier for all constraints of theConstraintProvider.verifyThat(BiFunction<ConstraintProvider_, ConstraintFactory, Constraint> constraintFunction) Creates a constraint verifier for a givenConstraintof theConstraintProvider.withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType) All subsequent calls toverifyThat(BiFunction)andverifyThat()use the givenConstraintStreamImplType.withDroolsAlphaNetworkCompilationEnabled(boolean droolsAlphaNetworkCompilationEnabled) Applies only toConstraintStreamImplType.DROOLS.
- 
Method Details- 
buildstatic <ConstraintProvider_ extends 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,- PlanningEntityused by the- PlanningSolution
- planningSolutionClass- never null,- PlanningSolution-annotated class associated with the constraints
- entityClasses- never null, at least one,- PlanningEntitytypes used by the- PlanningSolution
- Returns:
- never null
 
- 
createstatic <ConstraintProvider_ extends ConstraintProvider,Solution_> ConstraintVerifier<ConstraintProvider_,Solution_> create(SolverConfig solverConfig) Uses aSolverConfigto build aConstraintVerifier. Alternative tobuild(ConstraintProvider, Class, Class[]).- Type Parameters:
- ConstraintProvider_- type of the- ConstraintProvider
- Solution_- type of the- PlanningSolution-annotated class
- Parameters:
- solverConfig- never null, must have a- PlanningSolutionclass,- PlanningEntityclasses and a- ConstraintProviderconfigured.
- Returns:
- never null
 
- 
withConstraintStreamImplTypeConstraintVerifier<ConstraintProvider_,Solution_> withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType) All subsequent calls toverifyThat(BiFunction)andverifyThat()use the givenConstraintStreamImplType.- Parameters:
- constraintStreamImplType- never null
- Returns:
- this
 
- 
withDroolsAlphaNetworkCompilationEnabledConstraintVerifier<ConstraintProvider_,Solution_> withDroolsAlphaNetworkCompilationEnabled(boolean droolsAlphaNetworkCompilationEnabled) Applies only toConstraintStreamImplType.DROOLS. Do not enable when running in a native image.- Parameters:
- droolsAlphaNetworkCompilationEnabled- true to enable the alpha network compiler
- Returns:
- this
 
- 
verifyThatSingleConstraintVerification<Solution_> verifyThat(BiFunction<ConstraintProvider_, ConstraintFactory, Constraint> constraintFunction) Creates a constraint verifier for a givenConstraintof theConstraintProvider.- Parameters:
- constraintFunction- never null
- Returns:
- never null
 
- 
verifyThatMultiConstraintVerification<Solution_> verifyThat()Creates a constraint verifier for all constraints of theConstraintProvider.- Returns:
- never null
 
 
-