Interface DecimalMinValidator<T>

Type Parameters:
T - The target type.
All Superinterfaces:
ConstraintValidator<jakarta.validation.constraints.DecimalMin,T>, jakarta.validation.ConstraintValidator<jakarta.validation.constraints.DecimalMin,T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DecimalMinValidator<T> extends ConstraintValidator<jakarta.validation.constraints.DecimalMin,T>
Abstract implementation of a validator for DecimalMin.
Since:
1.2
Author:
graemerocher
  • Field Summary

    Fields inherited from interface io.micronaut.validation.validator.constraints.ConstraintValidator

    VALID
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    doComparison(T value, @NonNull BigDecimal bigDecimal)
    Perform the comparison for the given value.
    default boolean
    isValid(T value, @NonNull io.micronaut.core.annotation.AnnotationValue<jakarta.validation.constraints.DecimalMin> annotationMetadata, @NonNull ConstraintValidatorContext context)
    Implements the validation logic.

    Methods inherited from interface io.micronaut.validation.validator.constraints.ConstraintValidator

    isValid

    Methods inherited from interface jakarta.validation.ConstraintValidator

    initialize
  • Method Details

    • isValid

      default boolean isValid(@Nullable T value, @NonNull @NonNull io.micronaut.core.annotation.AnnotationValue<jakarta.validation.constraints.DecimalMin> annotationMetadata, @NonNull @NonNull ConstraintValidatorContext context)
      Description copied from interface: ConstraintValidator
      Implements the validation logic.

      Implementations should be thread-safe and immutable.

      Specified by:
      isValid in interface ConstraintValidator<jakarta.validation.constraints.DecimalMin,T>
      Parameters:
      value - object to validate
      annotationMetadata - The annotation metadata
      context - The context object
      Returns:
      false if value does not pass the constraint
    • doComparison

      int doComparison(@NonNull T value, @NonNull @NonNull BigDecimal bigDecimal)
      Perform the comparison for the given value.
      Parameters:
      value - The value
      bigDecimal - The big decimal
      Returns:
      The result