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
Stringschema validator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStringSchema.BuilderBuilder 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.Builderbuilder()protected booleancanEqual(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.booleanequals(Object o)FormatValidatorgetFormatValidator()IntegergetMaxLength()IntegergetMinLength()PatterngetPattern()inthashCode()booleanrequireString()-
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:SchemaSince 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()
-
-