Skip to content

Commit 2b7bfe9

Browse files
committed
docs(model): Document TextLocation.compareTo()
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 4df7b90 commit 2b7bfe9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

model/src/main/kotlin/TextLocation.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ data class TextLocation(
6565
*/
6666
constructor(path: String, line: Int) : this(path, line, line)
6767

68+
/**
69+
* Return a negative integer, zero, or a positive integer as this TextLocation comes before, is the same, or comes
70+
* after the [other] TextLocation.
71+
*/
6872
override fun compareTo(other: TextLocation) = COMPARATOR.compare(this, other)
6973

7074
/**

0 commit comments

Comments
 (0)