Class ConstraintMatch<Score_ extends Score<Score_>>

    • Method Detail

      • getConstraintPackage

        public String getConstraintPackage()
      • getConstraintName

        public String getConstraintName()
      • getJustificationList

        @Deprecated(forRemoval=true)
        public List<Object> getJustificationList()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Return a list of justifications for the constraint.

        This method has a different meaning based on which score director the constraint comes from.

        • For Score DRL, it returns every object that Drools considers to be part of the match. This is largely undefined.
        • For incremental score calculation, it returns what the calculator is implemented to return.
        • For constraint streams, it returns a list of facts from the matching tuple for backwards compatibility (eg. [A, B] for a bi stream), unless a custom justification mapping was provided, in which case it throws an exception, pointing users towards getJustification().
        Returns:
        never null
      • getJustification

        public <Justification_ extends ConstraintJustification> Justification_ getJustification()
        Return a singular justification for the constraint.

        This method has a different meaning based on which score director the constraint comes from.

        • For Score DRL, it returns DefaultConstraintJustification of all objects that Drools considers to be part of the match. This is largely undefined.
        • For incremental score calculation, it returns what the calculator is implemented to return.
        • For constraint streams, it returns DefaultConstraintJustification from the matching tuple (eg. [A, B] for a bi stream), unless a custom justification mapping was provided, in which case it returns the return value of that function.
        Returns:
        never null
      • getIndictedObjectList

        public List<Object> getIndictedObjectList()
        Returns a set of objects indicted for causing this constraint match.

        This method has a different meaning based on which score director the constraint comes from.

        • For Score DRL, it returns DefaultConstraintJustification of all objects that Drools considers to be part of the match. This is largely undefined.
        • For incremental score calculation, it returns what the calculator is implemented to return.
        • For constraint streams, it returns the facts from the matching tuple (eg. [A, B] for a bi stream), unless a custom indictment mapping was provided, in which case it returns the return value of that function.
        Returns:
        never null, may be empty
      • getScore

        public Score_ getScore()
      • getConstraintId

        public String getConstraintId()
      • getIdentificationString

        public String getIdentificationString()