Package org.sonar.api.batch.fs
Interface TextRange
-
public interface TextRange
Represents a text range in anInputFile
. A range is delimited by twoTextPointer
.TextRange(TextPointer(1, 0), TextPointer(1, 1))
represents the first character at line 1TextRange(TextPointer(1, 0), TextPointer(1, 10))
represents the 10 first characters at line 1
- Since:
- 5.2
- See Also:
InputFile.newRange(int, int, int, int)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextPointer
end()
End position of the rangeboolean
overlap(TextRange another)
Test if the current range has some common area with another range.TextPointer
start()
Start position of the range
-
-
-
Method Detail
-
start
TextPointer start()
Start position of the range
-
end
TextPointer end()
End position of the range
-
overlap
boolean overlap(TextRange another)
Test if the current range has some common area with another range. Exemple: say the two ranges are on same line. Range with offsets [1,3] overlaps range with offsets [2,4] but not range with offset [3,5]
-
-