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
Constructors Constructor Description DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, SolutionDescriptor<Solution_> solutionDescriptor)
-
Method Summary
-
-
-
Constructor Detail
-
DefaultConstraintVerifier
public DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, SolutionDescriptor<Solution_> solutionDescriptor)
-
-
Method Detail
-
getConstraintStreamImplType
public ConstraintStreamImplType getConstraintStreamImplType()
-
withConstraintStreamImplType
public ConstraintVerifier<ConstraintProvider_,Solution_> withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType)
Description copied from interface:ConstraintVerifier
All subsequent calls toConstraintVerifier.verifyThat(BiFunction)
andConstraintVerifier.verifyThat()
will 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
public DefaultMultiConstraintVerification<Solution_,Score_> 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
-
-