public class NumberListConstraints extends NumberConstraints implements ListConstraints
DEFAULT_FORMAT, format, max, min, uNames, uPattern, uValues
KW_MAX_LENGTH, KW_MIN_LENGTH, KW_SEPARATOR, SEPARATOR
Constructor and Description |
---|
NumberListConstraints()
Default constructor.
|
NumberListConstraints(Locale locale,
String min,
String max,
boolean allowDecimals,
boolean useGrouping,
String unitPattern,
String unitNames,
String unitValues,
String separator,
Integer minLength,
Integer maxLength)
Creates a constraints validator for lists of numbers.
|
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.
|
getFormat, getUnitBasedValue, getUnitName, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public NumberListConstraints()
public NumberListConstraints(Locale locale, String min, String max, boolean allowDecimals, boolean useGrouping, String unitPattern, String unitNames, String unitValues, String separator, Integer minLength, Integer maxLength)
locale
- context locale for validationmin
- If not null, it specifies the minimum numerical value the
individual parsed argument can have to be a valid parameter.max
- If not null, it specifies the maximum numerical value the
individual parsed argument can have to be a valid parameter.allowDecimals
- Boolean indicating whether decimal values are
allowed.useGrouping
- Boolean indicating whether grouping separator is
allowed.unitPattern
- regexp pattern for finding the start of units;
defaults to [:alpha:] character set allowed.unitNames
- comma-separated list of string-setsunitValues
- comma-separated list of unit multiplier valuesseparator
- 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 © 2016. All Rights Reserved.