public class DroolsConstraint<Solution_> extends Object implements Constraint
Constructor and Description |
---|
DroolsConstraint(DroolsConstraintFactory<Solution_> constraintFactory,
String constraintPackage,
String constraintName,
Function<Solution_,Score<?>> constraintWeightExtractor,
boolean positive,
List<DroolsFromUniConstraintStream<Solution_,Object>> fromStreamList) |
Modifier and Type | Method and Description |
---|---|
Rule |
createRule(<any> scoreHolderGlobal) |
Score<?> |
extractConstraintWeight(Solution_ workingSolution) |
ConstraintFactory |
getConstraintFactory()
The
ConstraintFactory that build this. |
String |
getConstraintName()
The constraint name.
|
String |
getConstraintPackage()
The constraint package is the namespace of the constraint.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConstraintId
public Rule createRule(<any> scoreHolderGlobal)
public ConstraintFactory getConstraintFactory()
Constraint
ConstraintFactory
that build this.getConstraintFactory
in interface Constraint
public String getConstraintPackage()
Constraint
When using a ConstraintConfiguration
,
it is equal to the ConstraintWeight.constraintPackage()
.
getConstraintPackage
in interface Constraint
public String getConstraintName()
Constraint
Constraint.getConstraintId()
is unique.
When using a ConstraintConfiguration
,
it is equal to the ConstraintWeight.value()
.
getConstraintName
in interface Constraint
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.