Commit 12c5a3b
build: Port geometry and quadtree packages to Kotlin (#1569)
* Rename .java to .kt
* feat(library): Port PointQuadTree and tests to Kotlin
This commit migrates the `PointQuadTree` class and its corresponding test, `PointQuadTreeTest`, from Java to idiomatic Kotlin.
This conversion modernizes the codebase, improving its conciseness, readability, and null safety.
The key changes are:
- **`PointQuadTree` to Kotlin**: The core `PointQuadTree` class has been rewritten in Kotlin, leveraging features like primary constructors, companion objects, and stricter nullability.
- **`PointQuadTreeTest` to Kotlin**: The associated test class has also been ported to Kotlin, resulting in more streamlined test code.
- **Copyright Header Update**: The copyright year has been updated in the converted files.
* Rename .java to .kt
* refactor(geometry): Port Point and Bounds classes to Kotlin
This commit modernizes the `Point` and `Bounds` classes by converting them from Java to idiomatic Kotlin. This change improves code conciseness, readability, and null safety.
Key changes include:
- The `Point` and `Bounds` classes are now written in Kotlin.
- `@JvmField` annotations are used on properties to maintain binary compatibility for Java consumers.
- New unit tests, `PointTest.kt` and `BoundsTest.kt`, have been added to ensure the correctness of the ported classes.
* feat: added headers
---------
Co-authored-by: Enrique López Mañas <[email protected]>1 parent 3471b4d commit 12c5a3b
File tree
10 files changed
+685
-557
lines changed- library/src
- main/java/com/google/maps/android
- geometry
- quadtree
- test/java/com/google/maps/android
- geometry
- quadtree
10 files changed
+685
-557
lines changedLines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments