Package org.everit.json.schema.internal
Class IPAddressValidator
- java.lang.Object
-
- org.everit.json.schema.internal.IPAddressValidator
-
- Direct Known Subclasses:
IPV4Validator
,IPV6Validator
@Deprecated public class IPAddressValidator extends Object
Deprecated.Common superclass forIPV4Validator
andIPV6Validator
.
-
-
Constructor Summary
Constructors Constructor Description IPAddressValidator()
Deprecated.
-
Method Summary
Modifier and Type Method Description protected Optional<InetAddress>
asInetAddress(String subject)
Deprecated.Creates anInetAddress
instance if possible and returns it, or on failure it returnsOptional.empty()
.protected Optional<String>
checkIpAddress(String subject, int expectedLength, String failureFormat)
Deprecated.Checks an IP address.
-
-
-
Method Detail
-
asInetAddress
protected Optional<InetAddress> asInetAddress(String subject)
Deprecated.Creates anInetAddress
instance 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
protected Optional<String> checkIpAddress(String subject, int expectedLength, String failureFormat)
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 format
of the validation failue message. The format string will receive only thesubject
parameter (so it has to be referred as%s
in the format string- Returns:
- the optional validation failure message
-
-