Package org.sonar.python
Record Class IPythonLocation
java.lang.Object
java.lang.Record
org.sonar.python.IPythonLocation
-
Constructor Summary
ConstructorsConstructorDescriptionIPythonLocation(int line, int column, Map<Integer, Integer> colOffset) IPythonLocation(int line, int column, Map<Integer, Integer> colOffset, boolean isCompresssed) Creates an instance of aIPythonLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecolOffsetrecord 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
Creates an instance of aIPythonLocationrecord class.- Parameters:
line- the value for thelinerecord componentcolumn- the value for thecolumnrecord componentcolOffset- the value for thecolOffsetrecord 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
-
colOffset
Returns the value of thecolOffsetrecord component.- Returns:
- the value of the
colOffsetrecord component
-
isCompresssed
public boolean isCompresssed()Returns the value of theisCompresssedrecord component.- Returns:
- the value of the
isCompresssedrecord component
-