Java, es4, classe Point serializzabile
-
>>
-
Definizione dell'oggetto Point (utilizzata dalla classe Address), che gestisce i dati di una posizione geografica (coordinate), con marcatori per la definizione in Xml.
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement()
public class Point {
public Point() {
Type = "";
}
private double Latitude;
@XmlElement()
public double getLatitude() {
return Latitude; //String.valueOf(Velocita);
}
public void setLatitude(double x) {
Latitude = x;
}
private double Longitude;
@XmlElement()
public double getLongitude() {
return Longitude; //String.valueOf(Velocita);
}
public void setLongitude(double x) {
Longitude = x;
}
private int Id;
@XmlElement()
public int getId() {
return Id;
}
public void setId(int x) {
Id = x;
}
// type = S start, type = E end
private String Type;
@XmlElement()
public String getType() {
return Type;
}
public void setType(String x) {
Type = x;
}
}