Class WeatherMapData

java.lang.Object
org.deltava.beans.wx.WeatherMapData
All Implemented Interfaces:
Serializable, Comparable<WeatherMapData>, Cacheable, ExpiringCacheable

public class WeatherMapData extends Object implements ExpiringCacheable, Comparable<WeatherMapData>
A bean to store consolidated front/cyclone data.
Since:
5.2
Version:
5.2
Author:
Luke
See Also:
  • Constructor Details

    • WeatherMapData

      public WeatherMapData(Instant dt)
      Creates the bean.
      Parameters:
      dt - the effective date/time in UTC
  • Method Details

    • add

      public void add(WeatherLine wl)
      Adds a front/trough.
      Parameters:
      wl - the WeatherLine
    • add

      public void add(Cyclone c)
      Adds a cyclone.
      Parameters:
      c - the Cyclone
    • getDate

      public Instant getDate()
    • getCyclones

      public Collection<Cyclone> getCyclones()
    • getFronts

      public Collection<WeatherLine> getFronts()
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • getExpiryDate

      public Instant getExpiryDate()
      Description copied from interface: ExpiringCacheable
      Returns the date this object should be considered expired.
      Specified by:
      getExpiryDate in interface ExpiringCacheable
      Returns:
      the expiry date/time
    • compareTo

      public int compareTo(WeatherMapData wmd)
      Compres two sets of weather map data by comparing their effective dates.
      Specified by:
      compareTo in interface Comparable<WeatherMapData>