Class InetAddressValidator

  • All Implemented Interfaces:
    jakarta.validation.ConstraintValidator<InetAddress,​CharSequence>

    public class InetAddressValidator
    extends Object
    implements jakarta.validation.ConstraintValidator<InetAddress,​CharSequence>

    InetAddress validation and conversion routines (java.net.InetAddress).

    This class provides methods to validate a candidate IP address.

    • Constructor Detail

      • InetAddressValidator

        public InetAddressValidator()
    • Method Detail

      • isValid

        public boolean isValid​(CharSequence value,
                               jakarta.validation.ConstraintValidatorContext context)
        Specified by:
        isValid in interface jakarta.validation.ConstraintValidator<InetAddress,​CharSequence>
      • initialize

        public void initialize​(InetAddress parameters)
        Specified by:
        initialize in interface jakarta.validation.ConstraintValidator<InetAddress,​CharSequence>