Files
weather-app/src/main/java/dev/clanders/weatherapi/response/Location.java
Cole Landers 9d87bf4575 init commit
2023-12-21 08:24:10 -06:00

17 lines
455 B
Java

package dev.clanders.weatherapi.response;
public class Location {
public double lat;
public double lon;
public String name;
public String type;
public String getCountry() {
// Probably not efficient to be splitting this string every time, but does
// it really matter in an app this size????
String[] locationValues = name.split(",");
return locationValues[locationValues.length - 1].trim();
}
}