Record Class ValidationResult.ValidationError

java.lang.Object
java.lang.Record
cloud.opencode.base.xml.validate.ValidationResult.ValidationError
Enclosing class:
ValidationResult

public static record ValidationResult.ValidationError(String message, int line, int column, ValidationResult.ValidationError.Severity severity) extends Record
Validation Error - Represents a single validation error or warning 验证错误 - 表示单个验证错误或警告
Since:
JDK 25, opencode-base-xml V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • ValidationError

      public ValidationError(String message, int line, int column, ValidationResult.ValidationError.Severity severity)
      Creates an instance of a ValidationError record class.
      Parameters:
      message - the value for the message record component
      line - the value for the line record component
      column - the value for the column record component
      severity - the value for the severity record component
  • Method Details

    • getMessage

      public String getMessage()
      Gets the message. 获取消息。
      Returns:
      the message | 消息
    • getLine

      public int getLine()
      Gets the line number. 获取行号。
      Returns:
      the line number | 行号
    • getColumn

      public int getColumn()
      Gets the column number. 获取列号。
      Returns:
      the column number | 列号
    • getSeverity

      Gets the severity. 获取严重级别。
      Returns:
      the severity | 严重级别
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • line

      public int line()
      Returns the value of the line record component.
      Returns:
      the value of the line record component
    • column

      public int column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • severity

      Returns the value of the severity record component.
      Returns:
      the value of the severity record component