completed parser for reparier-cafe jena
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -10,6 +10,11 @@ import org.json.JSONObject;
|
||||
* @param longitude the longitude
|
||||
*/
|
||||
public record Coords(double latitude,double longitude) {
|
||||
public static Coords from(String geo) {
|
||||
var parts = geo.split(";");
|
||||
return new Coords(Double.parseDouble(parts[0]), Double.parseDouble(parts[1]));
|
||||
}
|
||||
|
||||
/**
|
||||
* get a string representing this coords in the ICAL format, see <a href="https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.6">iCalendar spec</a>
|
||||
* @return the formatted coords
|
||||
|
||||
Reference in New Issue
Block a user