Class IfScoreResolver

  • All Implemented Interfaces:
    ScoreResolver<If>

    public class IfScoreResolver
    extends Object
    implements ScoreResolver<If>
    An IfScoreResolver is an implementation of ScoreResolver for the If operation.

    The score will be the maximum of the operations contained within the If operation, regardless of which of the two possibilities are executed.

    • Constructor Detail

      • IfScoreResolver

        public IfScoreResolver()
    • Method Detail

      • getScore

        public Integer getScore​(If operation)
        Description copied from interface: ScoreResolver
        Should return a (nullable) score for a given operation.
        Specified by:
        getScore in interface ScoreResolver<If>
        Parameters:
        operation - the provided operation for which the score should be resolved
        Returns:
        the score for the operation, otherwise null if not found
      • getScore

        public Integer getScore​(If operation,
                                ScoreResolver defaultScoreResolver)
        Description copied from interface: ScoreResolver
        Should return a (nullable) score for a given operation.
        Specified by:
        getScore in interface ScoreResolver<If>
        Parameters:
        operation - the provided operation for which the score should be resolved
        defaultScoreResolver - the default score resolver to look up scores for nested operations
        Returns:
        the score for the operation, otherwise null if not found