Package org.sonar.python
Record Class IPythonLocation
java.lang.Object
java.lang.Record
org.sonar.python.IPythonLocation
public record IPythonLocation(int line, int column, List<EscapeCharPositionInfo> colOffsets, boolean isCompresssed)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionIPythonLocation(int line, int column) IPythonLocation(int line, int column, List<EscapeCharPositionInfo> colOffsets) IPythonLocation(int line, int column, List<EscapeCharPositionInfo> colOffsets, boolean isCompresssed) Creates an instance of aIPythonLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecolOffsetsrecord component.intcolumn()Returns the value of thecolumnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCompresssedrecord component.intline()Returns the value of thelinerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IPythonLocation
-
IPythonLocation
public IPythonLocation(int line, int column) -
IPythonLocation
public IPythonLocation(int line, int column, List<EscapeCharPositionInfo> colOffsets, boolean isCompresssed) Creates an instance of aIPythonLocationrecord class.- Parameters:
line- the value for thelinerecord componentcolumn- the value for thecolumnrecord componentcolOffsets- the value for thecolOffsetsrecord componentisCompresssed- the value for theisCompresssedrecord 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 '=='. -
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
column
public int column()Returns the value of thecolumnrecord component.- Returns:
- the value of the
columnrecord component
-
colOffsets
Returns the value of thecolOffsetsrecord component.- Returns:
- the value of the
colOffsetsrecord component
-
isCompresssed
public boolean isCompresssed()Returns the value of theisCompresssedrecord component.- Returns:
- the value of the
isCompresssedrecord component
-