-
public interface FormatAttributeA Service Provider Interface for format attribute.- Author:
- leadpony
- See Also:
- JSON Schema Validation: A Vocabulary for Structural Validation of JSON, Section 7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default LocalizablelocalizedName()Returns the localized name.Stringname()Returns the name of this attribute.booleantest(JsonValue value)Checks if the value matches this format.InstanceTypevalueType()Returns the type of the value expected by this attribute.
-
-
-
Method Detail
-
name
String name()
Returns the name of this attribute.- Returns:
- the name of this attribute, never be
null.
-
localizedName
default Localizable localizedName()
Returns the localized name.- Returns:
- the localized name of this attribute, never be
null.
-
valueType
InstanceType valueType()
Returns the type of the value expected by this attribute.For integers this method must return
InstanceType.NUMBERinstead ofInstanceType.INTEGER.- Returns:
- the expected type of the value, never be
null.
-
test
boolean test(JsonValue value)
Checks if the value matches this format.- Parameters:
value- the value to check, cannot benull.- Returns:
trueif the value matches this format, orfalse.- Throws:
NullPointerException- if the specifiedvalueisnull.
-
-