Record Class ValidationResult
java.lang.Object
java.lang.Record
name.jurgenei.gradle.xml.validation.ValidationResult
- Record Components:
issues- normalized validation findingssvrlXml- optional native SVRL output; when empty, SVRL is generated from issues
Validation output for a single input document.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationResult(List<ValidationIssue> issues, String svrlXml) Creates a normalized validation result. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanIndicates whether the result contains any findings.final inthashCode()Returns a hash code value for this object.issues()Returns the value of theissuesrecord component.svrlXml()Returns the value of thesvrlXmlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ValidationResult
Creates a normalized validation result.- Parameters:
issues- validation findings; normalized to an immutable empty list when nullsvrlXml- optional SVRL payload; normalized to an empty string when null
-
-
Method Details
-
hasErrors
public boolean hasErrors()Indicates whether the result contains any findings.- Returns:
- true when one or more validation findings are present
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
issues
Returns the value of theissuesrecord component.- Returns:
- the value of the
issuesrecord component
-
svrlXml
Returns the value of thesvrlXmlrecord component.- Returns:
- the value of the
svrlXmlrecord component
-