Class DroolsConstraintFactory<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.score.stream.InnerConstraintFactory<Solution_,DroolsConstraint<Solution_>>
-
- org.optaplanner.core.impl.score.stream.drools.DroolsConstraintFactory<Solution_>
-
- All Implemented Interfaces:
ConstraintFactory
public final class DroolsConstraintFactory<Solution_> extends InnerConstraintFactory<Solution_,DroolsConstraint<Solution_>>
-
-
Constructor Summary
Constructors Constructor Description DroolsConstraintFactory(SolutionDescriptor<Solution_> solutionDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A> UniConstraintStream<A>
forEachIncludingNullVars(Class<A> sourceClass)
As defined byConstraintFactory.forEach(Class)
, but without any filtering of nullplanning entity
variables.<A> UniConstraintStream<A>
fromUnfiltered(Class<A> fromClass)
This method is deprecated.String
getDefaultConstraintPackage()
This isConstraintConfiguration.constraintPackage()
if available, otherwise the package of thePlanningSolution
class.SolutionDescriptor<Solution_>
getSolutionDescriptor()
DroolsVariableFactory
getVariableFactory()
-
Methods inherited from class org.optaplanner.core.impl.score.stream.InnerConstraintFactory
assertValidFromType, buildConstraints, forEach, forEachUniquePair, from, fromUniquePair, getNullityFilter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintFactory
forEachUniquePair, forEachUniquePair, forEachUniquePair, forEachUniquePair, forEachUniquePair, fromUniquePair, fromUniquePair, fromUniquePair, fromUniquePair, fromUniquePair
-
-
-
-
Constructor Detail
-
DroolsConstraintFactory
public DroolsConstraintFactory(SolutionDescriptor<Solution_> solutionDescriptor)
-
-
Method Detail
-
forEachIncludingNullVars
public <A> UniConstraintStream<A> forEachIncludingNullVars(Class<A> sourceClass)
Description copied from interface:ConstraintFactory
As defined byConstraintFactory.forEach(Class)
, but without any filtering of nullplanning entity
variables.- Type Parameters:
A
- the type of the matched problem fact orplanning entity
- Parameters:
sourceClass
- never null- Returns:
- never null
-
fromUnfiltered
public <A> UniConstraintStream<A> fromUnfiltered(Class<A> fromClass)
Description copied from interface:ConstraintFactory
This method is deprecated. Migrate uses of this method toConstraintFactory.forEachIncludingNullVars(Class)
, but first understand that subsequent joins and conditional propagation calls (UniConstraintStream.ifExists(java.lang.Class<B>, org.optaplanner.core.api.score.stream.bi.BiJoiner<A, B>)
etc.) will now also consistently filter out planning entities with null variables.The original Javadoc of this method follows:
As defined by
ConstraintFactory.from(Class)
, but without any filtering of uninitializedplanning entities
.- Type Parameters:
A
- the type of the matched problem fact orplanning entity
- Parameters:
fromClass
- never null- Returns:
- never null
-
getSolutionDescriptor
public SolutionDescriptor<Solution_> getSolutionDescriptor()
- Specified by:
getSolutionDescriptor
in classInnerConstraintFactory<Solution_,DroolsConstraint<Solution_>>
- Returns:
- never null
-
getVariableFactory
public DroolsVariableFactory getVariableFactory()
-
getDefaultConstraintPackage
public String getDefaultConstraintPackage()
Description copied from interface:ConstraintFactory
This isConstraintConfiguration.constraintPackage()
if available, otherwise the package of thePlanningSolution
class.- Returns:
- never null
-
-