Record Class CodeInsert
java.lang.Object
java.lang.Record
org.matwoess.jsourceprofiler.tool.model.CodeInsert
This class is used to represent a code insertion.
It contains the character position and the code to insert.
Used during both instrumentation and report generation.
-
Constructor Summary
ConstructorsConstructorDescriptionCodeInsert(int chPos, String code) Creates an instance of aCodeInsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintchPos()Returns the value of thechPosrecord component.code()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CodeInsert
Creates an instance of aCodeInsertrecord class.- Parameters:
chPos- the value for thechPosrecord componentcode- the value for thecoderecord 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 '=='. -
chPos
public int chPos()Returns the value of thechPosrecord component.- Returns:
- the value of the
chPosrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-