Package org.everit.json.schema
Class StringSchema
- java.lang.Object
-
- org.everit.json.schema.Schema
-
- org.everit.json.schema.StringSchema
-
public class StringSchema extends Schema
String
schema validator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StringSchema.Builder
Builder class forStringSchema
.
-
Field Summary
-
Fields inherited from class org.everit.json.schema.Schema
schemaLocation
-
-
Constructor Summary
Constructors Constructor Description StringSchema()
StringSchema(StringSchema.Builder builder)
Constructor.
-
Method Summary
Modifier and Type Method Description static StringSchema.Builder
builder()
protected boolean
canEqual(Object other)
Since we add state in subclasses, but want those subclasses to be non final, this allows us to have equals methods that satisfy the equals contract.boolean
equals(Object o)
FormatValidator
getFormatValidator()
Integer
getMaxLength()
Integer
getMinLength()
Pattern
getPattern()
int
hashCode()
boolean
requireString()
-
Methods inherited from class org.everit.json.schema.Schema
definesProperty, describeTo, failure, failure, getDefaultValue, getDescription, getId, getLocation, getSchemaLocation, getTitle, getUnprocessedProperties, hasDefaultValue, isNullable, isReadOnly, isWriteOnly, toString, validate
-
-
-
-
Constructor Detail
-
StringSchema
public StringSchema()
-
StringSchema
public StringSchema(StringSchema.Builder builder)
Constructor.- Parameters:
builder
- the builder object containing validation criteria
-
-
Method Detail
-
builder
public static StringSchema.Builder builder()
-
getMaxLength
public Integer getMaxLength()
-
getMinLength
public Integer getMinLength()
-
getPattern
public Pattern getPattern()
-
getFormatValidator
public FormatValidator getFormatValidator()
-
canEqual
protected boolean canEqual(Object other)
Description copied from class:Schema
Since we add state in subclasses, but want those subclasses to be non final, this allows us to have equals methods that satisfy the equals contract.http://www.artima.com/lejava/articles/equality.html
-
requireString
public boolean requireString()
-
-