Package org.everit.json.schema.internal
Class TemporalFormatValidator
- java.lang.Object
-
- org.everit.json.schema.internal.TemporalFormatValidator
-
- All Implemented Interfaces:
FormatValidator
- Direct Known Subclasses:
DateFormatValidator,TimeFormatValidator
public class TemporalFormatValidator extends java.lang.Object implements FormatValidator
Base class for date and time format validators
-
-
Field Summary
-
Fields inherited from interface org.everit.json.schema.FormatValidator
NONE
-
-
Method Summary
Modifier and Type Method Description java.util.Optional<java.lang.String>validate(java.lang.String subject)Implementation-specific validation ofsubject.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.everit.json.schema.FormatValidator
formatName
-
-
-
-
Method Detail
-
validate
public java.util.Optional<java.lang.String> validate(java.lang.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.
-
-