use of org.drools.core.rule.MutableTypeConstraint in project drools by kiegroup.
the class DefaultBetaConstraintsMetric method cloneIfInUse.
@Override
public DefaultBetaConstraintsMetric cloneIfInUse() {
if (constraints[0] instanceof MutableTypeConstraint && ((MutableTypeConstraint) constraints[0]).setInUse()) {
BetaNodeFieldConstraint[] clonedConstraints = new BetaNodeFieldConstraint[constraints.length];
for (int i = 0; i < constraints.length; i++) {
clonedConstraints[i] = constraints[i].cloneIfInUse();
}
DefaultBetaConstraintsMetric clone = new DefaultBetaConstraintsMetric();
clone.constraints = clonedConstraints;
clone.disableIndexing = disableIndexing;
clone.indexPrecedenceOption = indexPrecedenceOption;
clone.indexed = indexed;
return clone;
}
return this;
}
use of org.drools.core.rule.MutableTypeConstraint in project drools by kiegroup.
the class QuadroupleBetaConstraintsMetric method cloneIfInUse.
@Override
public QuadroupleBetaConstraintsMetric cloneIfInUse() {
if (constraints[0] instanceof MutableTypeConstraint && ((MutableTypeConstraint) constraints[0]).setInUse()) {
BetaNodeFieldConstraint[] clonedConstraints = new BetaNodeFieldConstraint[constraints.length];
for (int i = 0; i < constraints.length; i++) {
clonedConstraints[i] = constraints[i].cloneIfInUse();
}
QuadroupleBetaConstraintsMetric clone = new QuadroupleBetaConstraintsMetric(clonedConstraints, indexPrecedenceOption, disableIndexing);
clone.indexed = indexed;
return clone;
}
return this;
}
Aggregations