Record Class BlockSpecTextCodec.Issue

java.lang.Object
java.lang.Record
edu.cmu.tetrad.search.blocks.BlockSpecTextCodec.Issue
Record Components:
line - The line number where the issue occurred. Lines are 1-based indexed.
col - The column number where the issue occurred. Columns are 1-based indexed.
severity - The severity level of the issue, indicating whether it is an error or a warning.
message - A descriptive message detailing the nature of the issue.
token - The specific token or element in the input that caused the issue.
Enclosing class:
BlockSpecTextCodec

public static record BlockSpecTextCodec.Issue(int line, int col, BlockSpecTextCodec.Severity severity, String message, String token) extends Record
Represents an issue encountered during the parsing or processing of block specifications.

An issue captures specific details related to a problem found in the input textual representation of block specifications. This includes the line and column where the issue occurred, its severity, a descriptive message, and the token associated with the issue.

The purpose of this class is to provide a structured way to convey problems that arise during parsing or validation, allowing for clear identification and resolution of such issues.

  • Constructor Details

    • Issue

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

    • toString

      public final 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 '=='.
      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.
    • line

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

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

      public BlockSpecTextCodec.Severity severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component
    • message

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

      public String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component