Package org.everit.json.schema
Class StringSchema.Builder
- java.lang.Object
-
- org.everit.json.schema.Schema.Builder<StringSchema>
-
- org.everit.json.schema.StringSchema.Builder
-
- Enclosing class:
- StringSchema
public static class StringSchema.Builder extends Schema.Builder<StringSchema>
Builder class forStringSchema
.
-
-
Field Summary
-
Fields inherited from class org.everit.json.schema.Schema.Builder
unprocessedProperties
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description StringSchema
build()
StringSchema.Builder
formatValidator(FormatValidator formatValidator)
Setter for the format validator.StringSchema.Builder
maxLength(Integer maxLength)
StringSchema.Builder
minLength(Integer minLength)
StringSchema.Builder
pattern(String pattern)
StringSchema.Builder
pattern(Regexp pattern)
StringSchema.Builder
requiresString(boolean requiresString)
-
Methods inherited from class org.everit.json.schema.Schema.Builder
defaultValue, description, id, nullable, readOnly, schemaLocation, schemaLocation, title, unprocessedProperties, writeOnly
-
-
-
-
Method Detail
-
build
public StringSchema build()
- Specified by:
build
in classSchema.Builder<StringSchema>
-
formatValidator
public StringSchema.Builder formatValidator(FormatValidator formatValidator)
Setter for the format validator. It should be used in conjunction withFormatValidator.forFormat(String)
if a"format"
value is found in a schema json.- Parameters:
formatValidator
- the format validator- Returns:
this
-
maxLength
public StringSchema.Builder maxLength(Integer maxLength)
-
minLength
public StringSchema.Builder minLength(Integer minLength)
-
pattern
public StringSchema.Builder pattern(String pattern)
-
pattern
public StringSchema.Builder pattern(Regexp pattern)
-
requiresString
public StringSchema.Builder requiresString(boolean requiresString)
-
-