Class ChangedRangeTrait
- java.lang.Object
-
- software.amazon.smithy.diff.evaluators.AbstractDiffEvaluator
-
- software.amazon.smithy.diff.evaluators.ChangedRangeTrait
-
- All Implemented Interfaces:
DiffEvaluator
public final class ChangedRangeTrait extends AbstractDiffEvaluator
Detects when the Range trait is made more restrictive by either raising the min or lowering the max.
-
-
Constructor Summary
Constructors Constructor Description ChangedRangeTrait()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ValidationEvent>
evaluate(Differences differences)
Returns validation events given two models and the detected differences between them.protected java.util.Optional<java.math.BigDecimal>
getMax(RangeTrait t)
protected java.util.Optional<java.math.BigDecimal>
getMin(RangeTrait t)
protected java.lang.Class<RangeTrait>
getTraitType()
-
Methods inherited from class software.amazon.smithy.diff.evaluators.AbstractDiffEvaluator
danger, danger, error, error, getEventId, note, note, warning, warning
-
-
-
-
Method Detail
-
getTraitType
protected java.lang.Class<RangeTrait> getTraitType()
-
getMin
protected java.util.Optional<java.math.BigDecimal> getMin(RangeTrait t)
-
getMax
protected java.util.Optional<java.math.BigDecimal> getMax(RangeTrait 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.
-
-