Class METAR
java.lang.Object
org.deltava.beans.wx.WeatherDataBean
org.deltava.beans.wx.METAR
- All Implemented Interfaces:
Serializable,Comparable<WeatherDataBean>,GeoLocation,MapEntry,MarkerMapEntry,Cacheable
A bean to store airport METAR data.
- Since:
- 2.2
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.beans.wx.WeatherDataBean
WeatherDataBean.Type -
Field Summary
Fields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CloudLayer cl) Adds a cloud layer to this METAR.voidAdds a condition to this METAR.voidadd(RunwayVisualRange rvr) Adds a Runway Visual Range report to this METAR.Returns the cloud layers associated with this METAR.Returns the Conditions associated with this METAR.intReturns the dewpoint.intReturns the relative humidity.Returns the icon color for this entry if displayed in a Google Map.getILS()Returns the ILS category.booleanReturns if this is an auto-generated METAR.booleanReturns if this is a corrected METAR.doubleReturns the barometric pressure.Returns the METAR remarks.getRVR()Returns the Runway Visual Range reports associated with this METAR.intReturns the temperature.getType()Returns the data type.intReturns the visibility.booleanReturns if the visibility is less than the stated amount.intReturns the wind direction.intReturns the wind gust speed.intReturns the sustained wind speed.inthashCode()voidsetDewPoint(int dp) Updates the dew point.voidsetHumidity(int rh) Updates the relative humidity.voidsetILS(ILSCategory ilscat) Updates the ILS Category for this position.voidsetIsAutoGenerated(boolean autoGen) Marks this METAR as automatically generated.voidsetIsCorrected(boolean isCorrected) Marks this METAR as Corrected.voidsetPressure(double bp) Updates the barometric pressure.voidsetRemarks(String r) Updates the METAR remarks.voidsetTemperature(int temp) Updates the temperature.voidsetVisibility(int viz, boolean lt) Sets the visibility.voidsetWindDirection(int dir) Updates the wind direction.voidsetWindGust(int speed) Updates the wind gust speed.voidsetWindSpeed(int speed) Updates the sustained wind speed.Methods inherited from class org.deltava.beans.wx.WeatherDataBean
cacheKey, compareTo, create, equals, getCode, getCreatedOn, getData, getDate, getInfoBox, getLatitude, getLongitude, getName, setAirport, setAirport, setData, setDate, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceTo
-
Constructor Details
-
METAR
public METAR()
-
-
Method Details
-
getTemperature
public int getTemperature()Returns the temperature.- Returns:
- the temperature in degrees
-
getDewPoint
public int getDewPoint()Returns the dewpoint.- Returns:
- the dewpoint in degrees
-
getHumidity
public int getHumidity()Returns the relative humidity.- Returns:
- the relative humidity as a percentage
-
getWindDirection
public int getWindDirection()Returns the wind direction.- Returns:
- the wind direction in degrees
-
getWindSpeed
public int getWindSpeed()Returns the sustained wind speed.- Returns:
- the wind speed in knots
-
getWindGust
public int getWindGust()Returns the wind gust speed.- Returns:
- the gust speed in knots
-
getVisibility
public int getVisibility()Returns the visibility.- Returns:
- the visibility in feet
-
getVisibilityLessThan
public boolean getVisibilityLessThan()Returns if the visibility is less than the stated amount.- Returns:
- TRUE if less than, otherwise FALSE
-
getPressure
public double getPressure()Returns the barometric pressure.- Returns:
- the pressure in inches of mercury
-
getIsAutoGenerated
public boolean getIsAutoGenerated()Returns if this is an auto-generated METAR.- Returns:
- TRUE if automatically generated, otherwise FALSE
-
getIsCorrected
public boolean getIsCorrected()Returns if this is a corrected METAR.- Returns:
- TRUE if corrected, otherwise FALSE
-
getConditions
Returns the Conditions associated with this METAR.- Returns:
- a Collection of Condition beans
-
getClouds
Returns the cloud layers associated with this METAR.- Returns:
- a Collection of CloudLayer beans
-
getRVR
Returns the Runway Visual Range reports associated with this METAR.- Returns:
- a Collection of RunwayVisualRange beans
-
getRemarks
-
getILS
-
add
-
add
-
add
Adds a Runway Visual Range report to this METAR.- Parameters:
rvr- the RunwayVisualRange
-
setTemperature
public void setTemperature(int temp) Updates the temperature.- Parameters:
temp- the temperature in degrees
-
setDewPoint
public void setDewPoint(int dp) Updates the dew point.- Parameters:
dp- the dewpoint in degrees
-
setHumidity
public void setHumidity(int rh) Updates the relative humidity.- Parameters:
rh- the relative humidity percentage
-
setWindDirection
public void setWindDirection(int dir) Updates the wind direction.- Parameters:
dir- the wind direction in degrees
-
setWindSpeed
public void setWindSpeed(int speed) Updates the sustained wind speed.- Parameters:
speed- the wind speed in knots
-
setWindGust
public void setWindGust(int speed) Updates the wind gust speed.- Parameters:
speed- the gust speed in knots
-
setPressure
public void setPressure(double bp) Updates the barometric pressure.- Parameters:
bp- the pressure in inches of mercury
-
setIsAutoGenerated
public void setIsAutoGenerated(boolean autoGen) Marks this METAR as automatically generated.- Parameters:
autoGen- TRUE if auto-generated, otherwise FALSE- See Also:
-
setIsCorrected
public void setIsCorrected(boolean isCorrected) Marks this METAR as Corrected.- Parameters:
isCorrected- TRUE if corrected, otherwise FALSE
-
setVisibility
public void setVisibility(int viz, boolean lt) Sets the visibility.- Parameters:
viz- the visibility in feetlt- TRUE if less than the stated amount, otherwise FALSE
-
setRemarks
-
setILS
Updates the ILS Category for this position.- Parameters:
ilscat- the ILSCategory
-
getIconColor
Description copied from interface:MarkerMapEntryReturns the icon color for this entry if displayed in a Google Map.- Returns:
- the icon color
-
getType
Description copied from class:WeatherDataBeanReturns the data type.- Specified by:
getTypein classWeatherDataBean- Returns:
- the data type
-
hashCode
public int hashCode()- Overrides:
hashCodein classWeatherDataBean
-