Update Location fields to Double to avoid roundings
This commit is contained in:
parent
4fb51ec99c
commit
bea0b95fc7
@ -2,41 +2,26 @@ package org.telegram.telegrambots.meta.api.objects;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.telegram.telegrambots.meta.api.interfaces.BotApiObject;
|
import org.telegram.telegrambots.meta.api.interfaces.BotApiObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Ruben Bermudez
|
* @author Ruben Bermudez
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @brief This object represents a point on the map.
|
* This object represents a point on the map.
|
||||||
* @date 20 of June of 2015
|
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class Location implements BotApiObject {
|
public class Location implements BotApiObject {
|
||||||
|
|
||||||
private static final String LONGITUDE_FIELD = "longitude";
|
private static final String LONGITUDE_FIELD = "longitude";
|
||||||
private static final String LATITUDE_FIELD = "latitude";
|
private static final String LATITUDE_FIELD = "latitude";
|
||||||
|
|
||||||
@JsonProperty(LONGITUDE_FIELD)
|
@JsonProperty(LONGITUDE_FIELD)
|
||||||
private Float longitude; ///< Longitude as defined by sender
|
private Double longitude; ///< Longitude as defined by sender
|
||||||
@JsonProperty(LATITUDE_FIELD)
|
@JsonProperty(LATITUDE_FIELD)
|
||||||
private Float latitude; ///< Latitude as defined by sender
|
private Double latitude; ///< Latitude as defined by sender
|
||||||
|
|
||||||
public Location() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Float getLongitude() {
|
|
||||||
return longitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Float getLatitude() {
|
|
||||||
return latitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "Location{" +
|
|
||||||
"longitude=" + longitude +
|
|
||||||
", latitude=" + latitude +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user