Skip to content

Commit 67df807

Browse files
committed
Refactor JLLatLng to include a builder constructor for improved object creation
Signed-off-by: makbn <[email protected]>
1 parent b6f8cb9 commit 67df807

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jlmap-api/src/main/java/io/github/makbn/jlmap/model/JLLatLng.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
*/
1414
@Setter
1515
@Getter
16-
@Builder
17-
@AllArgsConstructor
1816
@NoArgsConstructor(force = true)
1917
@FieldDefaults(level = AccessLevel.PRIVATE)
2018
public class JLLatLng {
@@ -27,6 +25,12 @@ public class JLLatLng {
2725
*/
2826
double lng;
2927

28+
@Builder
29+
public JLLatLng(double lat, double lng) {
30+
this.lat = lat;
31+
this.lng = lng;
32+
}
33+
3034
/**
3135
* Calculate distance between two points in latitude and longitude taking
3236
* into account height difference.Uses Haversine method as its base.

0 commit comments

Comments
 (0)