@Override
    public final List<ValidationEvent> evaluate(Differences differences) {
        return differences.changedShapes()
                .flatMap(change -> {
                    Pair<T, T> pair = change.getChangedTrait(getTraitType()).orElse(null);
                    return pair == null
                            ? Stream.empty()
                            : validateTrait(change, pair).stream();
                })
                .collect(Collectors.toList());
    }
Implements the shared logic for length and range trait validation.

@param <T> LengthTrait or RangeTrait types to validate.
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/AbstractLengthAndRangeValidator.java