Package org.sonar.java.model.location
Class InternalPosition
java.lang.Object
org.sonar.java.model.location.InternalPosition
- All Implemented Interfaces:
Comparable<Position>,Position
-
Field Summary
Fields inherited from interface org.sonar.plugins.java.api.location.Position
FIRST_COLUMN, FIRST_LINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PositionatOffset(int line, int columnOffset) intcolumn()The column number at the specified line.intThe column offset at the specified line.intbooleaninthashCode()booleanbooleanintline()The line number in a file.intThe line offset in a file.toString()
-
Constructor Details
-
InternalPosition
public InternalPosition(int line, int column)
-
-
Method Details
-
atOffset
-
line
public int line()Description copied from interface:PositionThe line number in a file. First line number is 1. -
lineOffset
public int lineOffset()Description copied from interface:PositionThe line offset in a file. First line offset is 0. (lineOffset() == line() - 1)- Specified by:
lineOffsetin interfacePosition
-
column
public int column()Description copied from interface:PositionThe column number at the specified line. First column number is 1. (column() == columnOffset() + 1) -
columnOffset
public int columnOffset()Description copied from interface:PositionThe column offset at the specified line. First column offset is 0. (columnOffset() == column() - 1)- Specified by:
columnOffsetin interfacePosition
-
compareTo
- Specified by:
compareToin interfaceComparable<Position>
-
isBefore
-
isAfter
-
equals
-
hashCode
public int hashCode() -
toString
-