Record Class LineColumnConverter.Pos
java.lang.Object
java.lang.Record
org.sonar.java.model.LineColumnConverter.Pos
- Enclosing class:
LineColumnConverter
Represent the position in a source String. The first character is at
line 1, and columnOffset 0.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecolumnOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intline()Returns the value of thelinerecord component.Convert this object to an equivalentPosition.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pos
public Pos(int line, int columnOffset) Creates an instance of aPosrecord class.- Parameters:
line- the value for thelinerecord componentcolumnOffset- the value for thecolumnOffsetrecord component
-
-
Method Details
-
toPosition
-
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
columnOffset
public int columnOffset()Returns the value of thecolumnOffsetrecord component.- Returns:
- the value of the
columnOffsetrecord component
-