Search in sources :

Example 1 with Operator

use of org.kie.api.runtime.rule.Operator in project drools by kiegroup.

the class AlphaNode method calculateDeclaredMask.

public BitMask calculateDeclaredMask(Class modifiedClass, List<String> settableProperties) {
    boolean typeBit = false;
    if (constraint instanceof EvaluatorConstraint && ((EvaluatorConstraint) constraint).isSelf()) {
        Operator op = ((EvaluatorConstraint) constraint).getEvaluator().getOperator();
        if (op == IsAEvaluatorDefinition.ISA || op == IsAEvaluatorDefinition.NOT_ISA) {
            typeBit = true;
        }
    }
    BitMask mask = constraint.getListenedPropertyMask(modifiedClass, settableProperties);
    return typeBit ? mask.set(PropertySpecificUtil.TRAITABLE_BIT) : mask;
}
Also used : Operator(org.kie.api.runtime.rule.Operator) EvaluatorConstraint(org.drools.core.rule.constraint.EvaluatorConstraint) BitMask(org.drools.core.util.bitmask.BitMask)

Aggregations

EvaluatorConstraint (org.drools.core.rule.constraint.EvaluatorConstraint)1 BitMask (org.drools.core.util.bitmask.BitMask)1 Operator (org.kie.api.runtime.rule.Operator)1