Package cs1302.tracer.model
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 Summary
ConstructorsConstructorDescriptionBreakpointEntry(int lineNumber, boolean validBreakpoint, String lineContent) Constructs a single-file breakpoint entry.BreakpointEntry(int lineNumber, boolean validBreakpoint, String lineContent, String file) Creates an instance of aBreakpointEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelineContentrecord component.intReturns the value of thelineNumberrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thevalidBreakpointrecord component.
-
Constructor Details
-
BreakpointEntry
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
Creates an instance of aBreakpointEntryrecord class.- Parameters:
lineNumber- the value for thelineNumberrecord componentvalidBreakpoint- the value for thevalidBreakpointrecord componentlineContent- the value for thelineContentrecord componentfile- the value for thefilerecord 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 '=='. -
lineNumber
@SerializedName("lineNumber") public int lineNumber()Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-
validBreakpoint
@SerializedName("validBreakpoint") public boolean validBreakpoint()Returns the value of thevalidBreakpointrecord component.- Returns:
- the value of the
validBreakpointrecord component
-
lineContent
Returns the value of thelineContentrecord component.- Returns:
- the value of the
lineContentrecord component
-
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-