public abstract static class AbstractWeatherData.Coord
extends java.lang.Object
Coord
.
Standard behaviors like the has
and the get
methods for information about geographic coordinates (latitude and
longitude) are defined here.
Constructor and Description |
---|
AbstractWeatherData.Coord()
Non-parameterized constructor
|
AbstractWeatherData.Coord(org.json.JSONObject jsonObj)
Parameterized constructor
|
Modifier and Type | Method and Description |
---|---|
float |
getLatitude()
Returns data for latitude of the city.
|
float |
getLongitude()
Returns data for longitude of the city.
|
boolean |
hasLatitude()
Tells if the data for latitude of the city is available or not.
|
boolean |
hasLongitude()
Tells if the data for longitude of the city is available or not.
|
public AbstractWeatherData.Coord()
Initializes variables as per following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
public AbstractWeatherData.Coord(org.json.JSONObject jsonObj)
Initializes variables from values from the given JSON object.
jsonObj
- JSON object containing data about coordinatespublic boolean hasLatitude()
true
if data available, otherwise
false
public boolean hasLongitude()
true
if data available, otherwise
false
public float getLatitude()
Float.NaN
, i.e., Not a Number.public float getLongitude()
Float.NaN
, i.e., Not a Number.