Package org.everit.json.schema.internal
Class IPAddressValidator
java.lang.Object
org.everit.json.schema.internal.IPAddressValidator
- Direct Known Subclasses:
IPV4Validator,IPV6Validator
Deprecated.
Common superclass for
IPV4Validator and IPV6Validator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<InetAddress>asInetAddress(String subject) Deprecated.Creates anInetAddressinstance if possible and returns it, or on failure it returnsOptional.empty().checkIpAddress(String subject, int expectedLength, String failureFormat) Deprecated.Checks an IP address.
-
Constructor Details
-
IPAddressValidator
public IPAddressValidator()Deprecated.
-
-
Method Details
-
asInetAddress
Deprecated.Creates anInetAddressinstance if possible and returns it, or on failure it returnsOptional.empty().- Parameters:
subject- the string to be validated.- Returns:
- the optional validation failure message
-
checkIpAddress
Deprecated.Checks an IP address.- Parameters:
subject- the string to be validated.expectedLength- the expected length ofsubject- it is validated ifasInetAddress(String)validation succeeds.failureFormat- thestring formatof the validation failue message. The format string will receive only thesubjectparameter (so it has to be referred as%sin the format string- Returns:
- the optional validation failure message
-