- java.lang.Object
-
- io.rxmicro.validation.validator.IPConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<String>
public class IPConstraintValidator extends Object implements ConstraintValidator<String>
Validator for theIPconstraint.- Since:
- 0.1
- Author:
- nedis
- See Also:
IP
-
-
Constructor Summary
Constructors Constructor Description IPConstraintValidator(Collection<IP.Version> versions)Creates the default instance ofIPConstraintValidatorwith the supported IP versions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(String actual, HttpModelType httpModelType, String modelName)Validates the single actual.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.rxmicro.validation.ConstraintValidator
validate, validateList, validateList
-
-
-
-
Constructor Detail
-
IPConstraintValidator
public IPConstraintValidator(Collection<IP.Version> versions)
Creates the default instance ofIPConstraintValidatorwith the supported IP versions.- Parameters:
versions- the supported IP versions
-
-
Method Detail
-
validate
public void validate(String actual, HttpModelType httpModelType, String modelName)
Description copied from interface:ConstraintValidatorValidates the single actual.The state of the
actualmust not be altered.- Specified by:
validatein interfaceConstraintValidator<String>- Parameters:
actual- the actual value to validatehttpModelType- the http model typemodelName- the parameter or header name
-
-