Class IPAddressValidator

    • Constructor Detail

      • IPAddressValidator

        public IPAddressValidator()
        Deprecated.
    • Method Detail

      • asInetAddress

        protected Optional<InetAddress> asInetAddress​(String subject)
        Deprecated.
        Creates an InetAddress instance if possible and returns it, or on failure it returns Optional.empty().
        Parameters:
        subject - the string to be validated.
        Returns:
        the optional validation failure message
      • checkIpAddress

        protected Optional<String> checkIpAddress​(String subject,
                                                  int expectedLength,
                                                  String failureFormat)
        Deprecated.
        Checks an IP address.
        Parameters:
        subject - the string to be validated.
        expectedLength - the expected length of subject - it is validated if asInetAddress(String) validation succeeds.
        failureFormat - the string format of the validation failue message. The format string will receive only the subject parameter (so it has to be referred as %s in the format string
        Returns:
        the optional validation failure message