Class StringSchema


  • public class StringSchema
    extends Schema
    String schema validator.
    • Constructor Detail

      • StringSchema

        public StringSchema()
      • StringSchema

        public StringSchema​(StringSchema.Builder builder)
        Constructor.
        Parameters:
        builder - the builder object containing validation criteria
    • Method Detail

      • getMaxLength

        public Integer getMaxLength()
      • getMinLength

        public Integer getMinLength()
      • getPattern

        public Pattern getPattern()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Schema
      • 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

        Overrides:
        canEqual in class Schema
        Parameters:
        other - the subject of comparison
        Returns:
        true if this can be equal to other
      • requireString

        public boolean requireString()