public class AttributeValidationReportImpl extends Object implements AttributeValidationReport
Constructor and Description |
---|
AttributeValidationReportImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addSuggestedValue(String value)
Adds a suggested attribute value to the report.
|
void |
addSuggestedValues(Set<String> values)
Adds a a set of attribute values to the report.
|
void |
addViolation(ValidationViolation violation)
Adds a
ValidationViolation to the report. |
void |
addViolations(Set<ValidationViolation> violations)
Adds a set of
ValidationViolation to the report. |
Set<ValidationViolation> |
getAttributeValidationViolations()
Returns the set of
ValidationViolation s for the validated attribute. |
Set<String> |
getSuggestedValues()
Returns a set of suggested values for the attribute.
|
public void addViolation(ValidationViolation violation)
ValidationViolation
to the report.violation
- the violation to add to the report, cannot be nullIllegalArgumentException
- if violation
is nullpublic void addViolations(Set<ValidationViolation> violations)
ValidationViolation
to the report.violations
- the violation set to add to the report, cannot be null or emptyIllegalArgumentException
- if violation
is null or emptypublic void addSuggestedValue(String value)
value
- a suggested attribute value to add to the reportIllegalArgumentException
- if value
is nullpublic void addSuggestedValues(Set<String> values)
values
- a set of suggested attribute values to add to the report, cannot be null or emptyIllegalArgumentException
- if value
is null or emptypublic Set<ValidationViolation> getAttributeValidationViolations()
AttributeValidationReport
ValidationViolation
s for the validated attribute.
If there are no violations, this method just returns an empty set.
getAttributeValidationViolations
in interface AttributeValidationReport
public Set<String> getSuggestedValues()
AttributeValidationReport
If there are no suggested values, this method just returns an empty set.
getSuggestedValues
in interface AttributeValidationReport
This work is licensed under a Creative Commons Attribution 4.0 International License.