Class IpValidator

java.lang.Object
com.example.common.validate.BaseValidator
com.example.common.validate.IpValidator
All Implemented Interfaces:
ValidatorInterface

public class IpValidator extends BaseValidator implements ValidatorInterface
The IpValidator class extends the BaseValidator class and implements the ValidatorInterface for validating IP addresses.
  • Constructor Details

    • IpValidator

      public IpValidator(String value)
      Constructs an IpValidator object with the specified value.
      Parameters:
      value - the IP address value to validate
  • Method Details

    • validate

      public boolean validate()
      Validates the IP address value using a regular expression pattern.
      Specified by:
      validate in interface ValidatorInterface
      Returns:
      true if the IP address is valid, false otherwise