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 TypeMethodDescriptionvoid
add
(CloudLayer cl) Adds a cloud layer to this METAR.void
Adds a condition to this METAR.void
add
(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.int
Returns the dewpoint.int
Returns the relative humidity.Returns the icon color for this entry if displayed in a Google Map.getILS()
Returns the ILS category.boolean
Returns if this is an auto-generated METAR.boolean
Returns if this is a corrected METAR.double
Returns the barometric pressure.Returns the METAR remarks.getRVR()
Returns the Runway Visual Range reports associated with this METAR.int
Returns the temperature.getType()
Returns the data type.int
Returns the visibility.boolean
Returns if the visibility is less than the stated amount.int
Returns the wind direction.int
Returns the wind gust speed.int
Returns the sustained wind speed.int
hashCode()
void
setDewPoint
(int dp) Updates the dew point.void
setHumidity
(int rh) Updates the relative humidity.void
setILS
(ILSCategory ilscat) Updates the ILS Category for this position.void
setIsAutoGenerated
(boolean autoGen) Marks this METAR as automatically generated.void
setIsCorrected
(boolean isCorrected) Marks this METAR as Corrected.void
setPressure
(double bp) Updates the barometric pressure.void
setRemarks
(String r) Updates the METAR remarks.void
setTemperature
(int temp) Updates the temperature.void
setVisibility
(int viz, boolean lt) Sets the visibility.void
setWindDirection
(int dir) Updates the wind direction.void
setWindGust
(int speed) Updates the wind gust speed.void
setWindSpeed
(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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:MarkerMapEntry
Returns the icon color for this entry if displayed in a Google Map.- Returns:
- the icon color
-
getType
Description copied from class:WeatherDataBean
Returns the data type.- Specified by:
getType
in classWeatherDataBean
- Returns:
- the data type
-
hashCode
public int hashCode()- Overrides:
hashCode
in classWeatherDataBean
-