Interface Constraint

    • Method Detail

      • getRequiredDeclarations

        Declaration[] getRequiredDeclarations()
        Returns all the declarations required by the given constraint implementation.
        Returns:
      • replaceDeclaration

        void replaceDeclaration​(Declaration oldDecl,
                                Declaration newDecl)
        When a rule contains multiple logical branches, i.e., makes use of 'OR' CE, it is required to clone patterns and declarations for each logical branch. Since this is done at ReteOO build type, when constraints were already created, eventually some constraints need to update their references to the declarations.
        Parameters:
        oldDecl -
        newDecl -
      • clone

        Constraint clone()
        Clones the constraint
        Returns:
      • isTemporal

        boolean isTemporal()
        Returns true in case this constraint is a temporal constraint
        Returns:
      • getListenedPropertyMask

        default org.drools.core.util.bitmask.BitMask getListenedPropertyMask​(ObjectType objectType,
                                                                             java.util.List<java.lang.String> settableProperties)
      • getListenedPropertyMask

        default org.drools.core.util.bitmask.BitMask getListenedPropertyMask​(java.util.Optional<Pattern> pattern,
                                                                             ObjectType objectType,
                                                                             java.util.List<java.lang.String> settableProperties)
        Returns property reactivity BitMask of this constraint.
        Parameters:
        pattern - which this constraint belongs to. if pattern is empty, bind variables are considered to be declared in the same pattern. It should be fine for alpha constraints
        objectType -
        settableProperties -
        Returns:
        property reactivity BitMask
      • equals

        default boolean equals​(java.lang.Object object,
                               RuleBase kbase)
      • registerEvaluationContext

        default void registerEvaluationContext​(RuleBuildContext ruleBuildContext)
      • mergeEvaluationContext

        default void mergeEvaluationContext​(Constraint other)
      • getPackageNames

        default java.util.Collection<java.lang.String> getPackageNames()
      • addPackageNames

        default void addPackageNames​(java.util.Collection<java.lang.String> otherPkgs)