public class MappedFieldNameValidator extends java.lang.Object implements FieldNameValidator
This class should not be considered a part of the public API.
Constructor and Description |
---|
MappedFieldNameValidator(FieldNameValidator defaultValidator,
java.util.Map<java.lang.String,FieldNameValidator> fieldNameToValidatorMap)
The default validator will be use to validate all fields whose names are not contained int the fieldNameToValidator map.
|
Modifier and Type | Method and Description |
---|---|
FieldNameValidator |
getValidatorForField(java.lang.String fieldName)
Gets a new validator to use for the value of the field with the given name.
|
boolean |
validate(java.lang.String fieldName)
Returns true if the field name is valid, false otherwise.
|
public MappedFieldNameValidator(FieldNameValidator defaultValidator, java.util.Map<java.lang.String,FieldNameValidator> fieldNameToValidatorMap)
defaultValidator
- the validator to use for any fields not matching any field name in the mapfieldNameToValidatorMap
- a map from field name to FieldNameValidatorpublic boolean validate(java.lang.String fieldName)
FieldNameValidator
validate
in interface FieldNameValidator
fieldName
- the field namepublic FieldNameValidator getValidatorForField(java.lang.String fieldName)
FieldNameValidator
getValidatorForField
in interface FieldNameValidator
fieldName
- the field nameCopyright © 2010 - 2020 Adobe. All Rights Reserved