Class WhileScoreResolver

  • All Implemented Interfaces:
    ScoreResolver<While>

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

    The score will be the maximum of the transform operation and the delegate operation, multiplied by the minimum of the configured number of max repeats vs the global maximum number of allowed repeats.

    This is simply because the number of actual repetitions is nondeterministic, therefore a "worst"-case scenario is considered.

    • Constructor Detail

      • WhileScoreResolver

        public WhileScoreResolver()
    • Method Detail

      • getScore

        public Integer getScore​(While operation)
        Description copied from interface: ScoreResolver
        Should return a (nullable) score for a given operation.
        Specified by:
        getScore in interface ScoreResolver<While>
        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​(While operation,
                                ScoreResolver defaultScoreResolver)
        Description copied from interface: ScoreResolver
        Should return a (nullable) score for a given operation.
        Specified by:
        getScore in interface ScoreResolver<While>
        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