
net.sf.aguacate.model.FieldString Maven / Gradle / Ivy
package net.sf.aguacate.model;
import net.sf.aguacate.regex.Regex;
public class FieldString extends Field {
private final int minLenth;
private final int maxLength;
private final Regex regex;
public FieldString(String name, FieldType type, boolean optional, int minLenth, int maxLength, Regex regex) {
super(name, type, optional);
if (!FieldType.STRING.equals(type)) {
throw new IllegalArgumentException(type.toString());
}
this.minLenth = minLenth;
this.maxLength = maxLength;
this.regex = regex;
}
public int getMinLenth() {
return minLenth;
}
public int getMaxLength() {
return maxLength;
}
public Regex getRegex() {
return regex;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy