public class StringListConstraints extends StringConstraints implements ListConstraints
illegalERE, illegalValues, legalERE, legalValues, max, min
KW_MAX_LENGTH, KW_MIN_LENGTH, KW_SEPARATOR, SEPARATOR
Constructor and Description |
---|
StringListConstraints()
Default constructor.
|
StringListConstraints(String min,
String max,
String legalValues,
String illegalValues,
String legalERE,
String illegalERE,
String separator,
Integer minLength,
Integer maxLength)
Creates a constraints validator for lists of strings.
|
Modifier and Type | Method and Description |
---|---|
Integer |
getMaxLength()
Returns the maximum length of the list or null of there is not one.
|
Integer |
getMinLength()
Returns the minimum length of the list or null of there is not one.
|
String |
getSeparator()
Returns the character used as the item separator.
|
isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public StringListConstraints()
public StringListConstraints(String min, String max, String legalValues, String illegalValues, String legalERE, String illegalERE, String separator, Integer minLength, Integer maxLength)
min
- If not null, it specifies the minimum lexicographical value
the individual parsed argument can have to be a valid parameter.max
- If not null, it specifies the maximum lexicographical value
the individual parsed argument can have to be a valid parameter.legalValues
- A string-set token, listing all legal values that
the individual parsed argument can take on. The values in the set are
separated via the pipe (|) character and abbreviated values can be
specified using the asterisk (*) character.illegalValues
- A string-set token, listing all illegal values that
the individual parsed argument cannot take on. The values in the set are
separated via the pipe (|) character and abbreviated values can be
specified using the asterisk (*) character.legalERE
- Regular expression which the parameter must match,
or null.illegalERE
- Regular expression which the parameter must not match,
or null.separator
- Single character delimiter for list items.minLength
- Minimum length of the list of string tokens.maxLength
- Maximum length of the list of string tokens.public String getSeparator()
ListConstraints
getSeparator
in interface ListConstraints
ListConstraints.getSeparator()
public Integer getMinLength()
ListConstraints
getMinLength
in interface ListConstraints
ListConstraints.getMinLength()
public Integer getMaxLength()
ListConstraints
getMaxLength
in interface ListConstraints
ListConstraints.getMaxLength()
Copyright © 2015. All Rights Reserved.