public class NumericFieldDesc extends IntFieldDesc
Constructor and Description |
---|
NumericFieldDesc(java.lang.String fieldName)
Constructor taking a field name.
|
NumericFieldDesc(java.lang.String fieldName,
int min,
int max)
Constructor taking a field name and a range.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLenient()
Check whether this field descriptor uses lenient parsing
|
java.lang.Integer |
parse(java.lang.String stringVal)
Parse the value into the format for this field description.
|
void |
setLenient(boolean flag)
Set whether this field descriptor enforces strict or lenient parsing.
|
getFieldType, getMaxValue, getMinValue, isValid, parseValueIntoRecord, setValues, storeDefaultIntoRecord, toXml
addSourceField, applyTransform, getDefaultValue, getFieldName, getLookupIndexField, getLookupTable, getLookupValueField, getSourceFields, getTransform, isMultiValue, loadFromXml, setDefaultValue, setFieldName, setMultiValue
public NumericFieldDesc(java.lang.String fieldName)
fieldName
- the field name for this descriptorpublic NumericFieldDesc(java.lang.String fieldName, int min, int max)
fieldName
- the field name for this descriptormin
- the minimum valuemax
- the maximum valuepublic boolean isLenient()
public java.lang.Integer parse(java.lang.String stringVal) throws java.text.ParseException
parse
in class IntFieldDesc
stringVal
- the value to parsejava.text.ParseException
- if the string cannot be parsed as an integerpublic void setLenient(boolean flag)
flag
-