Package org.sonar.plugins.python.api
Record Class LocationInFile
java.lang.Object
java.lang.Record
org.sonar.plugins.python.api.LocationInFile
-
Constructor Summary
ConstructorsConstructorDescriptionLocationInFile(String fileId, int startLine, int startLineOffset, int endLine, int endLineOffset) Creates an instance of aLocationInFilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintendLine()Returns the value of theendLinerecord component.intReturns the value of theendLineOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.fileId()Returns the value of thefileIdrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thestartLinerecord component.intReturns the value of thestartLineOffsetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LocationInFile
public LocationInFile(String fileId, int startLine, int startLineOffset, int endLine, int endLineOffset) Creates an instance of aLocationInFilerecord class.- Parameters:
fileId- the value for thefileIdrecord componentstartLine- the value for thestartLinerecord componentstartLineOffset- the value for thestartLineOffsetrecord componentendLine- the value for theendLinerecord componentendLineOffset- the value for theendLineOffsetrecord 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 '=='. -
fileId
Returns the value of thefileIdrecord component.- Returns:
- the value of the
fileIdrecord component
-
startLine
public int startLine()Returns the value of thestartLinerecord component.- Returns:
- the value of the
startLinerecord component
-
startLineOffset
public int startLineOffset()Returns the value of thestartLineOffsetrecord component.- Returns:
- the value of the
startLineOffsetrecord component
-
endLine
public int endLine()Returns the value of theendLinerecord component.- Returns:
- the value of the
endLinerecord component
-
endLineOffset
public int endLineOffset()Returns the value of theendLineOffsetrecord component.- Returns:
- the value of the
endLineOffsetrecord component
-