Package org.sonar.api.batch.fs.internal
Class DefaultTextRange
- java.lang.Object
-
- org.sonar.api.batch.fs.internal.DefaultTextRange
-
-
Constructor Summary
Constructors Constructor Description DefaultTextRange(TextPointer start, TextPointer end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextPointerend()End position of the rangebooleanequals(java.lang.Object obj)inthashCode()booleanoverlap(TextRange another)Test if the current range has some common area with another range.TextPointerstart()Start position of the rangejava.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultTextRange
public DefaultTextRange(TextPointer start, TextPointer end)
-
-
Method Detail
-
start
public TextPointer start()
Description copied from interface:TextRangeStart position of the range
-
end
public TextPointer end()
Description copied from interface:TextRangeEnd position of the range
-
overlap
public boolean overlap(TextRange another)
Description copied from interface:TextRangeTest 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]
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-