Class CurrentCondition
java.lang.Object
cz.krystofcejchan.lite_weather_lib.weather_objects.subparts.current_weather.CurrentCondition
public final class CurrentCondition extends Object
Current weather / the latest weather data
- Version:
- 17
- Author:
- krystof-cejchan
-
Constructor Summary
Constructors Constructor Description CurrentCondition(String location)Constructor required to create this object of this class -
Method Summary
Modifier and Type Method Description intgetCloudCover()Cloud cover is an important component of understanding and predicting the weather.
Not only does cloud cover impact sky conditions and inform precipitation predictions,
it also helps regulate the temperature that occurs in a region.intgetFeelsLikeC()Feels Like Index is a factored mixture of the Wind Chill Factor and the Heat Index.
The combination of the heat index and the wind chill factor are denoted collectively by the single
terms apparent temperature or relative outdoor temperature or simply Feels Like.intgetFeelsLikeF()Feels Like Index is a factored mixture of the Wind Chill Factor and the Heat Index.
The combination of the heat index and the wind chill factor are denoted collectively by the single
terms apparent temperature or relative outdoor temperature or simply Feels Like.intgetHumidity()Humidity is the amount of water vapor in the air.LocalDateTimegetLocalObsDateTime()StringgetLocation()LocalTimegetObservationTime()doublegetPrecipInches()Precipitation is any liquid or frozen water that forms in the atmosphere and falls to the Earth.
It is one of the three main steps of the global water cycle.
* sourcedoublegetPrecipMM()Precipitation is any liquid or frozen water that forms in the atmosphere and falls to the Earth.
It is one of the three main steps of the global water cycle.
* sourceintgetPressure()The air around you has weight, and it presses against everything it touches.intgetPressureInches()The air around you has weight, and it presses against everything it touches.intgetTemp_C()intgetTemp_F()intgetUvIndex()intgetVisibility()intgetVisibilityMiles()intgetWeatherCode()StringgetWeatherDescription()examples: Cloudy, Sunny, Snowy, Heavy Rainstorm...StringgetWindDir16Point()examples: west, south, south-east...intgetWinDirDegree()intgetWindSpeedKmph()intgetWindSpeedMiles()voidprint()prints current object.toString to the consoleStringtoString()
-
Constructor Details
-
CurrentCondition
Constructor required to create this object of this class- Parameters:
location-Stringlocation / area you want to get the forecast for- Throws:
CouldNotFindLocation
-
-
Method Details
-
getFeelsLikeC
public int getFeelsLikeC()Feels Like Index is a factored mixture of the Wind Chill Factor and the Heat Index.
The combination of the heat index and the wind chill factor are denoted collectively by the single
terms apparent temperature or relative outdoor temperature or simply Feels Like.
* source- Returns:
- feels-like temperature in Celsius
-
getFeelsLikeF
public int getFeelsLikeF()Feels Like Index is a factored mixture of the Wind Chill Factor and the Heat Index.
The combination of the heat index and the wind chill factor are denoted collectively by the single
terms apparent temperature or relative outdoor temperature or simply Feels Like.
* source- Returns:
- feels-like temperature in Fahrenheit
-
getCloudCover
public int getCloudCover()Cloud cover is an important component of understanding and predicting the weather.
Not only does cloud cover impact sky conditions and inform precipitation predictions,
it also helps regulate the temperature that occurs in a region.
* source- Returns:
- cloud coverage
-
getHumidity
public int getHumidity()Humidity is the amount of water vapor in the air. If there is a lot of water vapor in the air,
the humidity will be high. The higher the humidity, the wetter it feels outside.
* source- Returns:
- cloud coverage
-
getLocalObsDateTime
- Returns:
- Local date and time
LocalDateTimeat the provided location
-
getObservationTime
- Returns:
- Local time
LocalTimeof the observation
-
getPrecipInches
public double getPrecipInches()Precipitation is any liquid or frozen water that forms in the atmosphere and falls to the Earth.
It is one of the three main steps of the global water cycle.
* source- Returns:
- precipitation in inches
-
getPrecipMM
public double getPrecipMM()Precipitation is any liquid or frozen water that forms in the atmosphere and falls to the Earth.
It is one of the three main steps of the global water cycle.
* source- Returns:
- precipitation in millimeters
-
getPressure
public int getPressure()The air around you has weight, and it presses against everything it touches. That pressure is called atmospheric pressure, or air pressure.
source- Returns:
- Atmospheric Pressure in Millibars
-
getPressureInches
public int getPressureInches()The air around you has weight, and it presses against everything it touches. That pressure is called atmospheric pressure, or air pressure.
source- Returns:
- Atmospheric Pressure in inches
-
getTemp_C
public int getTemp_C()- Returns:
- current temperature in Celsius
-
getTemp_F
public int getTemp_F()- Returns:
- current temperature in Fahrenheit
-
getUvIndex
public int getUvIndex()- Returns:
- UV index
-
getVisibility
public int getVisibility()- Returns:
- how far can you see in kilometers
-
getVisibilityMiles
public int getVisibilityMiles()- Returns:
- how far can you see in miles
-
getWeatherCode
public int getWeatherCode()- Returns:
- weather code
-
getWeatherDescription
examples: Cloudy, Sunny, Snowy, Heavy Rainstorm...- Returns:
- weather description
-
getWindDir16Point
examples: west, south, south-east...- Returns:
- direction of wind
-
getWinDirDegree
public int getWinDirDegree()- Returns:
- wind direction degree
-
getWindSpeedKmph
public int getWindSpeedKmph()- Returns:
- wind speed in kilometers per hour
-
getWindSpeedMiles
public int getWindSpeedMiles()- Returns:
- wind speed in miles per hour
-
print
public void print()prints current object.toString to the console -
getLocation
- Returns:
- location provided in the constructor of this class or its parent class
if you need to get more detailed information, useNearestArea
-
toString
-