Class METAR

All Implemented Interfaces:
Serializable, Comparable<WeatherDataBean>, GeoLocation, MapEntry, MarkerMapEntry, Cacheable

public class METAR extends WeatherDataBean
A bean to store airport METAR data.
Since:
2.2
Version:
7.0
Author:
Luke
See Also:
  • 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

      public Collection<Condition> getConditions()
      Returns the Conditions associated with this METAR.
      Returns:
      a Collection of Condition beans
    • getClouds

      public SortedSet<CloudLayer> getClouds()
      Returns the cloud layers associated with this METAR.
      Returns:
      a Collection of CloudLayer beans
    • getRVR

      public Collection<RunwayVisualRange> getRVR()
      Returns the Runway Visual Range reports associated with this METAR.
      Returns:
      a Collection of RunwayVisualRange beans
    • getRemarks

      public String getRemarks()
      Returns the METAR remarks.
      Returns:
      the remarks
    • getILS

      public ILSCategory getILS()
      Returns the ILS category.
      Returns:
      an ILSCategory
    • add

      public void add(Condition c)
      Adds a condition to this METAR.
      Parameters:
      c - the Condition
    • add

      public void add(CloudLayer cl)
      Adds a cloud layer to this METAR.
      Parameters:
      cl - the CloudLayer
    • add

      public void add(RunwayVisualRange rvr)
      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 feet
      lt - TRUE if less than the stated amount, otherwise FALSE
    • setRemarks

      public void setRemarks(String r)
      Updates the METAR remarks.
      Parameters:
      r - the remarks
    • setILS

      public void setILS(ILSCategory ilscat)
      Updates the ILS Category for this position.
      Parameters:
      ilscat - the ILSCategory
    • getIconColor

      public String getIconColor()
      Description copied from interface: MarkerMapEntry
      Returns the icon color for this entry if displayed in a Google Map.
      Returns:
      the icon color
    • getType

      public WeatherDataBean.Type getType()
      Description copied from class: WeatherDataBean
      Returns the data type.
      Specified by:
      getType in class WeatherDataBean
      Returns:
      the data type
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class WeatherDataBean