Class LengthEvaluator

java.lang.Object
dev.dokimos.core.BaseEvaluator
dev.dokimos.core.evaluators.LengthEvaluator
All Implemented Interfaces:
Evaluator

public class LengthEvaluator extends BaseEvaluator
Evaluator that checks if the length of the actual output falls within an inclusive [minimumOutputLength, maximumOutputLength] range.

Length is measured in Unicode code points rather than UTF-16 char units, so a supplementary character such as an emoji counts as one, not two.

  • Method Details

    • builder

      public static LengthEvaluator.Builder builder()
      Creates a new builder for constructing length evaluators.
      Returns:
      a new builder