Class DefaultConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_,Score_ extends Score<Score_>>
java.lang.Object
org.optaplanner.test.impl.score.stream.DefaultConstraintVerifier<ConstraintProvider_,Solution_,Score_>
- All Implemented Interfaces:
ConstraintVerifier<ConstraintProvider_,
Solution_>
public final class DefaultConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_,Score_ extends Score<Score_>>
extends Object
implements ConstraintVerifier<ConstraintProvider_,Solution_>
-
Constructor Summary
ConstructorDescriptionDefaultConstraintVerifier
(ConstraintProvider_ constraintProvider, SolutionDescriptor<Solution_> solutionDescriptor) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Creates a constraint verifier for all constraints of theConstraintProvider
.verifyThat
(BiFunction<ConstraintProvider_, ConstraintFactory, Constraint> constraintFunction) Creates a constraint verifier for a givenConstraint
of theConstraintProvider
.withConstraintStreamImplType
(ConstraintStreamImplType constraintStreamImplType) All subsequent calls toConstraintVerifier.verifyThat(BiFunction)
andConstraintVerifier.verifyThat()
use the givenConstraintStreamImplType
.withDroolsAlphaNetworkCompilationEnabled
(boolean droolsAlphaNetworkCompilationEnabled) Applies only toConstraintStreamImplType.DROOLS
.
-
Constructor Details
-
DefaultConstraintVerifier
public DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, SolutionDescriptor<Solution_> solutionDescriptor)
-
-
Method Details
-
getConstraintStreamImplType
-
withConstraintStreamImplType
public ConstraintVerifier<ConstraintProvider_,Solution_> withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType) Description copied from interface:ConstraintVerifier
All subsequent calls toConstraintVerifier.verifyThat(BiFunction)
andConstraintVerifier.verifyThat()
use the givenConstraintStreamImplType
.- Specified by:
withConstraintStreamImplType
in interfaceConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,
Solution_> - Parameters:
constraintStreamImplType
- never null- Returns:
- this
-
isDroolsAlphaNetworkCompilationEnabled
public boolean isDroolsAlphaNetworkCompilationEnabled() -
withDroolsAlphaNetworkCompilationEnabled
public ConstraintVerifier<ConstraintProvider_,Solution_> withDroolsAlphaNetworkCompilationEnabled(boolean droolsAlphaNetworkCompilationEnabled) Description copied from interface:ConstraintVerifier
Applies only toConstraintStreamImplType.DROOLS
. Do not enable when running in a native image.- Specified by:
withDroolsAlphaNetworkCompilationEnabled
in interfaceConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,
Solution_> - Parameters:
droolsAlphaNetworkCompilationEnabled
- true to enable the alpha network compiler- Returns:
- this
-
verifyThat
public DefaultSingleConstraintVerification<Solution_,Score_> verifyThat(BiFunction<ConstraintProvider_, ConstraintFactory, Constraint> constraintFunction) Description copied from interface:ConstraintVerifier
Creates a constraint verifier for a givenConstraint
of theConstraintProvider
.- Specified by:
verifyThat
in interfaceConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,
Solution_> - Parameters:
constraintFunction
- never null- Returns:
- never null
-
verifyThat
Description copied from interface:ConstraintVerifier
Creates a constraint verifier for all constraints of theConstraintProvider
.- Specified by:
verifyThat
in interfaceConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,
Solution_> - Returns:
- never null
-