Class IPAddressValidator

    • Constructor Summary

      Constructors 
      Constructor Description
      IPAddressValidator()
      Deprecated.
       
    • Method Summary

      Modifier and Type Method Description
      protected java.util.Optional<java.net.InetAddress> asInetAddress​(java.lang.String subject)
      Deprecated.
      Creates an InetAddress instance if possible and returns it, or on failure it returns Optional.empty().
      protected java.util.Optional<java.lang.String> checkIpAddress​(java.lang.String subject, int expectedLength, java.lang.String failureFormat)
      Deprecated.
      Checks an IP address.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IPAddressValidator

        public IPAddressValidator()
        Deprecated.
    • Method Detail

      • asInetAddress

        protected java.util.Optional<java.net.InetAddress> asInetAddress​(java.lang.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 java.util.Optional<java.lang.String> checkIpAddress​(java.lang.String subject,
                                                                      int expectedLength,
                                                                      java.lang.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