Package org.everit.json.schema.internal
Class IPV6Validator
- java.lang.Object
-
- org.everit.json.schema.internal.IPAddressValidator
-
- org.everit.json.schema.internal.IPV6Validator
-
- All Implemented Interfaces:
FormatValidator
public class IPV6Validator extends IPAddressValidator implements FormatValidator
Implementation of the "ipv6" format value.
-
-
Field Summary
-
Fields inherited from interface org.everit.json.schema.FormatValidator
NONE
-
-
Constructor Summary
Constructors Constructor Description IPV6Validator()
-
Method Summary
-
Methods inherited from class org.everit.json.schema.internal.IPAddressValidator
asInetAddress, checkIpAddress
-
-
-
-
Method Detail
-
validate
public Optional<String> validate(String subject)
Description copied from interface:FormatValidatorImplementation-specific validation ofsubject. If a validation error occurs then implementations should return a programmer-friendly error message as a String wrapped in an Optional. If the validation succeeded thenan empty optionalshould be returned.- Specified by:
validatein interfaceFormatValidator- Parameters:
subject- the string to be validated- Returns:
- an
Optionalwrapping the error message if a validation error occured, otherwisean empty optional.
-
formatName
public String formatName()
Description copied from interface:FormatValidatorProvides the name of this format.Unless specified otherwise the
The default implementation of this method returnsSchemaLoaderwill use this name to recognize string schemas using this format."unnamed-format". It is strongly recommended for implementations to give a more meaningful name by overriding this method.- Specified by:
formatNamein interfaceFormatValidator- Returns:
- the format name.
-
-