Package: org.grails.validation.routines

## [Java] Class InetAddressValidator

- org.grails.validation.routines.InetAddressValidator

- All Implemented Interfaces and Traits:
    java.io.Serializable

      public class InetAddressValidator
      extends java.lang.Object

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

  This class provides methods to validate a candidate IP address.

  This class is a Singleton; you can retrieve the instance via the getInstance() method.

  Since:
    Validator 1.4

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static InetAddressValidator` | `getInstance()` Returns the singleton instance of this validator.
    `` | `boolean` | `isValid(java.lang.String inetAddress)` Checks if the specified string is a valid IP address.
    `` | `boolean` | `isValidInet4Address(java.lang.String inet4Address)` Validates an IPv4 address.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### public static InetAddressValidator getInstance()

      Returns the singleton instance of this validator.

      Returns:
        the singleton instance of this validator

    - #### public boolean isValid(java.lang.String inetAddress)

      Checks if the specified string is a valid IP address.

      Parameters:
        `inetAddress` - the string to validate
      Returns:
        true if the string validates as an IP address

    - #### public boolean isValidInet4Address(java.lang.String inet4Address)

      Validates an IPv4 address. Returns true if valid.

      Parameters:
        `inet4Address` - the IPv4 address to validate
      Returns:
        true if the argument contains a valid IPv4 address