Interface ConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_>
-
- All Known Implementing Classes:
DefaultConstraintVerifier
public interface ConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <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.MultiConstraintVerification<Solution_>verifyThat()Creates a constraint verifier for all constraints of theConstraintProvider.SingleConstraintVerification<Solution_>verifyThat(BiFunction<ConstraintProvider_,ConstraintFactory,Constraint> constraintFunction)Creates a constraint verifier for a givenConstraintof theConstraintProvider.ConstraintVerifier<ConstraintProvider_,Solution_>withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType)All subsequent calls toverifyThat(BiFunction)andverifyThat()use the givenConstraintStreamImplType.ConstraintVerifier<ConstraintProvider_,Solution_>withDroolsAlphaNetworkCompilationEnabled(boolean droolsAlphaNetworkCompilationEnabled)Applies only toConstraintStreamImplType.DROOLS.
-
-
-
Method Detail
-
build
static <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 theConstraintProviderSolution_- type of thePlanningSolution-annotated class- Parameters:
constraintProvider- never null,PlanningEntityused by thePlanningSolutionplanningSolutionClass- never null,PlanningSolution-annotated class associated with the constraintsentityClasses- never null, at least one,PlanningEntitytypes used by thePlanningSolution- Returns:
- never null
-
create
static <ConstraintProvider_ extends ConstraintProvider,Solution_> ConstraintVerifier<ConstraintProvider_,Solution_> create(SolverConfig solverConfig)
Uses aSolverConfigto build aConstraintVerifier. Alternative tobuild(ConstraintProvider, Class, Class[]).- Type Parameters:
ConstraintProvider_- type of theConstraintProviderSolution_- type of thePlanningSolution-annotated class- Parameters:
solverConfig- never null, must have aPlanningSolutionclass,PlanningEntityclasses and aConstraintProviderconfigured.- Returns:
- never null
-
withConstraintStreamImplType
ConstraintVerifier<ConstraintProvider_,Solution_> withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType)
All subsequent calls toverifyThat(BiFunction)andverifyThat()use the givenConstraintStreamImplType.- Parameters:
constraintStreamImplType- never null- Returns:
- this
-
withDroolsAlphaNetworkCompilationEnabled
ConstraintVerifier<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
-
verifyThat
SingleConstraintVerification<Solution_> verifyThat(BiFunction<ConstraintProvider_,ConstraintFactory,Constraint> constraintFunction)
Creates a constraint verifier for a givenConstraintof theConstraintProvider.- Parameters:
constraintFunction- never null- Returns:
- never null
-
verifyThat
MultiConstraintVerification<Solution_> verifyThat()
Creates a constraint verifier for all constraints of theConstraintProvider.- Returns:
- never null
-
-