Package dev.omnist.validation
Record Class ValidationResult
java.lang.Object
java.lang.Record
dev.omnist.validation.ValidationResult
- Record Components:
isValid- true if zero diagnostics were raised.diagnostics- List of all validation diagnostics found across the document tree.
public record ValidationResult(boolean isValid, List<ValidationDiagnostic> diagnostics)
extends Record
Structured outcome of validating a Document against a Schema (ยง3.6).
-
Constructor Summary
ConstructorsConstructorDescriptionValidationResult(boolean isValid, List<ValidationDiagnostic> diagnostics) Creates an instance of aValidationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thediagnosticsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisValid()Returns the value of theisValidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ValidationResult
Creates an instance of aValidationResultrecord class.- Parameters:
isValid- the value for theisValidrecord componentdiagnostics- the value for thediagnosticsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
isValid
public boolean isValid()Returns the value of theisValidrecord component.- Returns:
- the value of the
isValidrecord component
-
diagnostics
Returns the value of thediagnosticsrecord component.- Returns:
- the value of the
diagnosticsrecord component
-