All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.aguacate.model.FieldString Maven / Gradle / Ivy

There is a newer version: 0.10.9
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy