Class DefaultConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_>
- java.lang.Object
-
- org.optaplanner.test.impl.score.stream.DefaultConstraintVerifier<ConstraintProvider_,Solution_>
-
- All Implemented Interfaces:
ConstraintVerifier<ConstraintProvider_,Solution_>
public final class DefaultConstraintVerifier<ConstraintProvider_ extends ConstraintProvider,Solution_> extends Object implements ConstraintVerifier<ConstraintProvider_,Solution_>
-
-
Constructor Summary
Constructors Constructor Description DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, SolutionDescriptor<Solution_> solutionDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SolutionDescriptor<Solution_>
getSolutionDescriptor()
DefaultMultiConstraintVerification<Solution_>
verifyThat()
Creates a constraint verifier for all constraints of theConstraintProvider
.DefaultSingleConstraintVerification<Solution_>
verifyThat(BiFunction<ConstraintProvider_,ConstraintFactory,Constraint> constraintFunction)
Creates a constraint verifier for a givenConstraint
of theConstraintProvider
.ConstraintVerifier<ConstraintProvider_,Solution_>
withConstraintStreamImplType(ConstraintStreamImplType constraintStreamImplType)
All subsequent calls toConstraintVerifier.verifyThat(BiFunction)
andConstraintVerifier.verifyThat()
will use the givenConstraintStreamImplType
.
-
-
-
Constructor Detail
-
DefaultConstraintVerifier
public DefaultConstraintVerifier(ConstraintProvider_ constraintProvider, SolutionDescriptor<Solution_> solutionDescriptor)
-
-
Method Detail
-
getSolutionDescriptor
protected SolutionDescriptor<Solution_> getSolutionDescriptor()
-
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
-
verifyThat
public DefaultSingleConstraintVerification<Solution_> 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_> 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
-
-