public class ValidationViolationImpl extends Object implements ValidationViolation
ValidationViolation.Severity
Constructor and Description |
---|
ValidationViolationImpl(Set<String> attributes,
String message,
ValidationViolation.Severity severity)
Creates a
ValidationViolationImpl with the specified attribute(s), message, and
severity. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Set<String> |
getAttributes()
Returns the name(s) of the attribute(s) associated with the violation.
|
String |
getMessage()
Returns a message describing the violation.
|
ValidationViolation.Severity |
getSeverity()
Returns the severity of the violation.
|
int |
hashCode() |
public ValidationViolationImpl(Set<String> attributes, String message, ValidationViolation.Severity severity)
ValidationViolationImpl
with the specified attribute(s), message, and
severity.attributes
- the attribute(s) involved in the violation, cannot be null or emptymessage
- the message describing the violation, cannot be null, empty, or blankseverity
- the severity of the violation, cannot be nullIllegalArgumentException
- if any of the parameters are null, empty, or blankpublic Set<String> getAttributes()
ValidationViolation
getAttributes
in interface ValidationViolation
public ValidationViolation.Severity getSeverity()
ValidationViolation
getSeverity
in interface ValidationViolation
public String getMessage()
ValidationViolation
getMessage
in interface ValidationViolation
This work is licensed under a Creative Commons Attribution 4.0 International License.