Class DecimalMinValidatorForMonetaryAmount

  • All Implemented Interfaces:
    ConstraintValidator<DecimalMin,​javax.money.MonetaryAmount>

    public class DecimalMinValidatorForMonetaryAmount
    extends Object
    implements ConstraintValidator<DecimalMin,​javax.money.MonetaryAmount>
    Check that the number being validated is less than or equal to the maximum value specified.
    Author:
    Lukas Niemeier, Willi Schönborn
    • Constructor Detail

      • DecimalMinValidatorForMonetaryAmount

        public DecimalMinValidatorForMonetaryAmount()
    • Method Detail

      • isValid

        public boolean isValid​(javax.money.MonetaryAmount value,
                               ConstraintValidatorContext context)
        Description copied from interface: ConstraintValidator
        Implements the validation logic. The state of value must not be altered.

        This method can be accessed concurrently, thread-safety must be ensured by the implementation.

        Specified by:
        isValid in interface ConstraintValidator<DecimalMin,​javax.money.MonetaryAmount>
        Parameters:
        value - object to validate
        context - context in which the constraint is evaluated
        Returns:
        false if value does not pass the constraint