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 BitMask getListenedPropertyMask​(Class modifiedClass,
                                                List<String> settableProperties)
      • getListenedPropertyMask

        default BitMask getListenedPropertyMask​(Optional<Pattern> pattern,
                                                Class modifiedClass,
                                                List<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
        modifiedClass -
        settableProperties -
        Returns:
        property reactivity BitMask
      • registerEvaluationContext

        default void registerEvaluationContext​(BuildContext buildContext)
      • mergeEvaluationContext

        default void mergeEvaluationContext​(Constraint other)
      • addPackageNames

        default void addPackageNames​(Collection<String> otherPkgs)