Class WeatherObject
java.lang.Object
cz.krystofcejchan.lite_weather_lib.weather_objects.WeatherObject
public final class WeatherObject extends Object
Universal object from which you can get to more detailed objects
Request, NearestArea, WeatherForecast, CurrentCondition, which lead
to another even more detailed objects or class fields- Version:
- 17
- Author:
- krystof-cejchan
-
Constructor Summary
Constructors Constructor Description WeatherObject(String location, DAY[] day, TIME... times)WeatherObject(String location, DAY day, TIME... times)WeatherObject(String location, TIME[] times, DAY... days)WeatherObject(String location, TIME time, DAY... days) -
Method Summary
Modifier and Type Method Description CurrentConditiongetCurrentCondition()DAY[]getDays()org.json.JSONObjectgetJson()StringgetJsonAsText()StringgetLocation()NearestAreagetNearestArea()RequestgetRequest()TIME[]getTimes()WeatherForecastgetWeatherForecast()voidprint()prints current object.toString to the consoleStringtoString()
-
Constructor Details
-
WeatherObject
- Throws:
IOException
-
WeatherObject
- Throws:
IOException
-
WeatherObject
- Throws:
IOException
-
WeatherObject
public WeatherObject(String location, TIME[] times, DAY... days) throws IOException, CouldNotFindLocation- Throws:
IOExceptionCouldNotFindLocation
-
-
Method Details
-
getDays
- Returns:
- provided days in constructor
-
getTimes
- Returns:
- provided TIMEs in constructor
-
getJson
public org.json.JSONObject getJson()- Returns:
- json as
JSONObject
-
getJsonAsText
- Returns:
- JSONObject as
String
-
getCurrentCondition
- Returns:
- CurrentCondition object
-
getNearestArea
- Returns:
- Nearest Area object
-
getRequest
- Returns:
- Request object
-
getWeatherForecast
- Returns:
- WeatherForecast object
-
getLocation
- Returns:
- location from constructor
-
print
public void print()prints current object.toString to the console -
toString
-