Record Class BreakpointEntry

java.lang.Object
java.lang.Record
cs1302.tracer.model.BreakpointEntry
Record Components:
lineNumber - The 1-based source line number.
validBreakpoint - True if this line is a valid breakpoint location.
lineContent - The source code text of this line.
file - The optional relative source file path for multi-file programs.

public record BreakpointEntry(int lineNumber, boolean validBreakpoint, String lineContent, String file) extends Record
Represents a line entry for list-breakpoints in JSON format.
  • Constructor Details

    • BreakpointEntry

      public BreakpointEntry(int lineNumber, boolean validBreakpoint, String lineContent)
      Constructs a single-file breakpoint entry.
      Parameters:
      lineNumber - The 1-based source line number.
      validBreakpoint - True if this line is a valid breakpoint location.
      lineContent - The source code text of this line.
    • BreakpointEntry

      public BreakpointEntry(int lineNumber, boolean validBreakpoint, String lineContent, String file)
      Creates an instance of a BreakpointEntry record class.
      Parameters:
      lineNumber - the value for the lineNumber record component
      validBreakpoint - the value for the validBreakpoint record component
      lineContent - the value for the lineContent record component
      file - the value for the file 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.
    • lineNumber

      @SerializedName("lineNumber") public int lineNumber()
      Returns the value of the lineNumber record component.
      Returns:
      the value of the lineNumber record component
    • validBreakpoint

      @SerializedName("validBreakpoint") public boolean validBreakpoint()
      Returns the value of the validBreakpoint record component.
      Returns:
      the value of the validBreakpoint record component
    • lineContent

      @SerializedName("lineContent") public String lineContent()
      Returns the value of the lineContent record component.
      Returns:
      the value of the lineContent record component
    • file

      @SerializedName("file") public String file()
      Returns the value of the file record component.
      Returns:
      the value of the file record component