Class ChangedLengthTrait

  • All Implemented Interfaces:
    DiffEvaluator

    public final class ChangedLengthTrait
    extends AbstractDiffEvaluator
    Detects when the Length trait is made more restrictive by either raising the min or lowering the max.
    • Constructor Detail

      • ChangedLengthTrait

        public ChangedLengthTrait()
    • Method Detail

      • getTraitType

        protected java.lang.Class<LengthTrait> getTraitType()
      • getMin

        protected java.util.Optional<java.math.BigDecimal> getMin​(LengthTrait t)
      • getMax

        protected java.util.Optional<java.math.BigDecimal> getMax​(LengthTrait t)
      • evaluate

        public final java.util.List<ValidationEvent> evaluate​(Differences differences)
        Description copied from interface: DiffEvaluator
        Returns validation events given two models and the detected differences between them.
        Parameters:
        differences - Detected differences.
        Returns:
        Returns validation events that are relative to the new model.