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