Skip to content

Commit

Permalink
Merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaytotomato committed Aug 11, 2024
1 parent 0ce17a7 commit 3030878
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions location4j/src/main/java/com/tomaytotomato/model/City.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class City implements Serializable {
private String name;
private BigDecimal latitude;
private BigDecimal longitude;
private double latitudeDouble = 0.0;
private double longitudeDouble = 0.0;

/**
* Default constructor for City.
Expand Down Expand Up @@ -86,6 +88,24 @@ public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public double getLatitudeDouble() {
if (latitudeDouble == 0.0) {
latitudeDouble = latitude.doubleValue();
}
return latitudeDouble;
}

public double getLongitudeDouble() {
if (longitudeDouble == 0.0) {
longitudeDouble = longitude.doubleValue();
}
return longitudeDouble;
}

public BigDecimal getLatitude() {
return latitude;
}
Expand Down

0 comments on commit 3030878

Please sign in to comment.