Class IsAEvaluatorDefinition

  • All Implemented Interfaces:
    Externalizable, Serializable, org.drools.compiler.rule.builder.EvaluatorDefinition, org.kie.api.runtime.rule.EvaluatorDefinition

    public class IsAEvaluatorDefinition
    extends Object
    implements org.drools.compiler.rule.builder.EvaluatorDefinition

    The implementation of the 'str' evaluator definition.

    The str compares two string values.

    Lets look at some examples:

    $m : Message( routingValue str[startsWith] "R1" )
    $m : Message( routingValue str[endsWith] "R2" )
    $m : Message( routingValue str[length] 17 )
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  IsAEvaluatorDefinition.IsAEvaluator  
      • Nested classes/interfaces inherited from interface org.drools.compiler.rule.builder.EvaluatorDefinition

        org.drools.compiler.rule.builder.EvaluatorDefinition.Target
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.drools.drl.parser.impl.Operator ISA  
      protected static String isAOp  
      static org.drools.drl.parser.impl.Operator NOT_ISA  
    • Field Detail

      • ISA

        public static org.drools.drl.parser.impl.Operator ISA
      • NOT_ISA

        public static org.drools.drl.parser.impl.Operator NOT_ISA
    • Constructor Detail

      • IsAEvaluatorDefinition

        public IsAEvaluatorDefinition()
    • Method Detail

      • getEvaluator

        public org.drools.core.rule.accessor.Evaluator getEvaluator​(org.drools.core.base.ValueType type,
                                                                    org.drools.drl.parser.impl.Operator operator)
        Specified by:
        getEvaluator in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • getEvaluator

        public org.drools.core.rule.accessor.Evaluator getEvaluator​(org.drools.core.base.ValueType type,
                                                                    org.drools.drl.parser.impl.Operator operator,
                                                                    String parameterText)
        Specified by:
        getEvaluator in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • getEvaluator

        public org.drools.core.rule.accessor.Evaluator getEvaluator​(org.drools.core.base.ValueType type,
                                                                    String operatorId,
                                                                    boolean isNegated,
                                                                    String parameterText)
        Specified by:
        getEvaluator in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • getEvaluator

        public org.drools.core.rule.accessor.Evaluator getEvaluator​(org.drools.core.base.ValueType type,
                                                                    String operatorId,
                                                                    boolean isNegated,
                                                                    String parameterText,
                                                                    org.drools.compiler.rule.builder.EvaluatorDefinition.Target leftTarget,
                                                                    org.drools.compiler.rule.builder.EvaluatorDefinition.Target rightTarget)
        Specified by:
        getEvaluator in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • getEvaluatorIds

        public String[] getEvaluatorIds()
        Specified by:
        getEvaluatorIds in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • getTarget

        public org.drools.compiler.rule.builder.EvaluatorDefinition.Target getTarget()
        Specified by:
        getTarget in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • isNegatable

        public boolean isNegatable()
        Specified by:
        isNegatable in interface org.drools.compiler.rule.builder.EvaluatorDefinition
      • supportsType

        public boolean supportsType​(org.drools.core.base.ValueType type)
        Specified by:
        supportsType in interface org.drools.compiler.rule.builder.EvaluatorDefinition