public abstract class RangeParserValidator<T extends Comparable<T>> extends BaseParserValidator<T>
Modifier and Type | Field and Description |
---|---|
static String |
LEFT_RANGE_DELIMITER |
protected static String |
LEFT_RANGE_DELIMITER_REGEXP |
protected static String |
RANGE_MAIN_REGEXP |
static String |
RIGHT_RANGE_DELIMITER |
protected static String |
RIGHT_RANGE_DELIMITER_REGEXP |
model
Constructor and Description |
---|
RangeParserValidator(String model) |
Modifier and Type | Method and Description |
---|---|
protected Validator<T> |
createValidator(String model,
Converter<T> converter)
Create a validator used by this parser, using eventually a converter
|
protected com.google.common.collect.Range<T> |
extractRange(String value,
Converter<T> converter) |
createConverter, getClassType, getType, getTypeRegexp, parseAndGetOneGroup, parseAndGetRegexGroups, parseAndValidate, parseAndValidate
public static final String LEFT_RANGE_DELIMITER
public static final String RIGHT_RANGE_DELIMITER
protected static final String LEFT_RANGE_DELIMITER_REGEXP
protected static final String RIGHT_RANGE_DELIMITER_REGEXP
protected static final String RANGE_MAIN_REGEXP
public RangeParserValidator(String model) throws ModelSyntaxException
ModelSyntaxException
protected Validator<T> createValidator(String model, Converter<T> converter) throws ModelSyntaxException
BaseParserValidator
createValidator
in class BaseParserValidator<T extends Comparable<T>>
model
- model used to create the validatorconverter
- converter eventually used to create the validatorModelSyntaxException
protected com.google.common.collect.Range<T> extractRange(String value, Converter<T> converter) throws ModelSyntaxException
ModelSyntaxException