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 TextPointer
end()
End position of the rangeboolean
equals(java.lang.Object obj)
int
hashCode()
boolean
overlap(TextRange another)
Test if the current range has some common area with another range.TextPointer
start()
Start position of the rangejava.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultTextRange
public DefaultTextRange(TextPointer start, TextPointer end)
-
-
Method Detail
-
start
public TextPointer start()
Description copied from interface:TextRange
Start position of the range
-
end
public TextPointer end()
Description copied from interface:TextRange
End position of the range
-
overlap
public boolean overlap(TextRange another)
Description copied from interface:TextRange
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]
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-