Class DefaultConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,Solution_,Score_ extends org.optaplanner.core.api.score.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 org.optaplanner.core.api.score.stream.ConstraintProvider,Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>> extends Object implements ConstraintVerifier<ConstraintProvider_,Solution_>
-
-
Constructor Summary
Constructors Constructor Description DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor<Solution_> solutionDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.optaplanner.core.api.score.stream.ConstraintStreamImplTypegetConstraintStreamImplType()booleanisDroolsAlphaNetworkCompilationEnabled()DefaultMultiConstraintVerification<Solution_,Score_>verifyThat()Creates a constraint verifier for all constraints of theConstraintProvider.DefaultSingleConstraintVerification<Solution_,Score_>verifyThat(BiFunction<ConstraintProvider_,org.optaplanner.core.api.score.stream.ConstraintFactory,org.optaplanner.core.api.score.stream.Constraint> constraintFunction)Creates a constraint verifier for a givenConstraintof theConstraintProvider.ConstraintVerifier<ConstraintProvider_,Solution_>withConstraintStreamImplType(org.optaplanner.core.api.score.stream.ConstraintStreamImplType constraintStreamImplType)All subsequent calls toConstraintVerifier.verifyThat(BiFunction)andConstraintVerifier.verifyThat()use the givenConstraintStreamImplType.ConstraintVerifier<ConstraintProvider_,Solution_>withDroolsAlphaNetworkCompilationEnabled(boolean droolsAlphaNetworkCompilationEnabled)Applies only toConstraintStreamImplType.DROOLS.
-
-
-
Constructor Detail
-
DefaultConstraintVerifier
public DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor<Solution_> solutionDescriptor)
-
-
Method Detail
-
getConstraintStreamImplType
public org.optaplanner.core.api.score.stream.ConstraintStreamImplType getConstraintStreamImplType()
-
withConstraintStreamImplType
public ConstraintVerifier<ConstraintProvider_,Solution_> withConstraintStreamImplType(org.optaplanner.core.api.score.stream.ConstraintStreamImplType constraintStreamImplType)
Description copied from interface:ConstraintVerifierAll subsequent calls toConstraintVerifier.verifyThat(BiFunction)andConstraintVerifier.verifyThat()use the givenConstraintStreamImplType.- Specified by:
withConstraintStreamImplTypein interfaceConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,Solution_>- Parameters:
constraintStreamImplType- never null- Returns:
- this
-
isDroolsAlphaNetworkCompilationEnabled
public boolean isDroolsAlphaNetworkCompilationEnabled()
-
withDroolsAlphaNetworkCompilationEnabled
public ConstraintVerifier<ConstraintProvider_,Solution_> withDroolsAlphaNetworkCompilationEnabled(boolean droolsAlphaNetworkCompilationEnabled)
Description copied from interface:ConstraintVerifierApplies only toConstraintStreamImplType.DROOLS. Do not enable when running in a native image.- Specified by:
withDroolsAlphaNetworkCompilationEnabledin interfaceConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,Solution_>- Parameters:
droolsAlphaNetworkCompilationEnabled- true to enable the alpha network compiler- Returns:
- this
-
verifyThat
public DefaultSingleConstraintVerification<Solution_,Score_> verifyThat(BiFunction<ConstraintProvider_,org.optaplanner.core.api.score.stream.ConstraintFactory,org.optaplanner.core.api.score.stream.Constraint> constraintFunction)
Description copied from interface:ConstraintVerifierCreates a constraint verifier for a givenConstraintof theConstraintProvider.- Specified by:
verifyThatin interfaceConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,Solution_>- Parameters:
constraintFunction- never null- Returns:
- never null
-
verifyThat
public DefaultMultiConstraintVerification<Solution_,Score_> verifyThat()
Description copied from interface:ConstraintVerifierCreates a constraint verifier for all constraints of theConstraintProvider.- Specified by:
verifyThatin interfaceConstraintVerifier<ConstraintProvider_ extends org.optaplanner.core.api.score.stream.ConstraintProvider,Solution_>- Returns:
- never null
-
-