/** Constructs a regular-expression constraint. * * @param regex ignored if null or empty * @param errmsg the error message to display. Ignored if null or empty. * @since 8.0.1 */ public SimpleDateConstraint(Pattern regex, String errmsg) { super(regex, errmsg); fixConstraint(); }
/** Constructs a constraint combining regular expression. * * @param flags a combination of {@link #NO_POSITIVE}, {@link #NO_NEGATIVE}, * {@link #NO_ZERO}, and so on. * @param regex ignored if null or empty * @param errmsg the error message to display. Ignored if null or empty. * @since 8.0.1 */ public SimpleDateConstraint(int flags, Pattern regex, String errmsg) { super(flags, regex, errmsg); fixConstraint(); }
/** Constructs a constraint with a list of constraints separated by comma. * * @param constraint a list of constraints separated by comma. * Example: "between 20071012 and 20071223", "before 20080103" */ public SimpleDateConstraint(String constraint) { super(constraint); fixConstraint(); }
/** Constraints a constraint. * * @param flags a combination of {@link #NO_POSITIVE}, {@link #NO_NEGATIVE}, * {@link #NO_ZERO}, and so on. * @param errmsg the error message to display. Ignored if null or empty. */ public SimpleDateConstraint(int flags, String errmsg) { super(flags, errmsg); fixConstraint(); }
public SimpleDateConstraint(int flags) { super(flags); fixConstraint(); }
/** Constructs a constraint with beginning and ending date. * * @param flags a combination of {@link #NO_POSITIVE}, {@link #NO_NEGATIVE}, * {@link #NO_ZERO}, and so on. * @param begin the beginning date, or null if no constraint at the beginning * date. * @param end the ending date, or null if no constraint at the ending * date. * @param errmsg the error message to display. Ignored if null or empty. */ public SimpleDateConstraint(int flags, Date begin, Date end, String errmsg) { super(flags, errmsg); _beg = begin; _end = end; fixConstraint(); }
/** Constructs a regular-expression constraint. * * @param regex ignored if null or empty. Unlike constraint, the regex doesn't need to enclose with '/'. * @param errmsg the error message to display. Ignored if null or empty. * @deprecated As of release 8.0.1, replaced with {@link #SimpleDateConstraint(Pattern, String)} */ public SimpleDateConstraint(String regex, String errmsg) { super(regex == null || regex.length() == 0 ? null : Pattern.compile(regex), errmsg); fixConstraint(); }
/** Constructs a constraint combining regular expression. * * @param flags a combination of {@link #NO_POSITIVE}, {@link #NO_NEGATIVE}, * {@link #NO_ZERO}, and so on. * @param regex ignored if null or empty. Unlike constraint, the regex doesn't need to enclose with '/'. * @param errmsg the error message to display. Ignored if null or empty. * @deprecated As of release 8.0.1, replaced with {@link #SimpleDateConstraint(int, Pattern, String)} */ public SimpleDateConstraint(int flags, String regex, String errmsg) { super(flags, regex == null || regex.length() == 0 ? null : Pattern.compile(regex), errmsg); fixConstraint(); }