Record Class WeatherDTO

java.lang.Object
java.lang.Record
web.sportflow.weather.WeatherDTO

public record WeatherDTO(double latitude, double longitude, double generationTimeMs, int utcOffsetSeconds, String timezone, String timezoneAbbreviation, double elevation, web.sportflow.weather.HourlyUnits hourlyUnits, web.sportflow.weather.Hourly hourly) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    WeatherDTO(double latitude, double longitude, double generationTimeMs, int utcOffsetSeconds, String timezone, String timezoneAbbreviation, double elevation, web.sportflow.weather.HourlyUnits hourlyUnits, web.sportflow.weather.Hourly hourly)
    Creates an instance of a WeatherDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the elevation record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the generationTimeMs record component.
    final int
    Returns a hash code value for this object.
    web.sportflow.weather.Hourly
    Returns the value of the hourly record component.
    web.sportflow.weather.HourlyUnits
    Returns the value of the hourlyUnits record component.
    double
    Returns the value of the latitude record component.
    double
    Returns the value of the longitude record component.
    Returns the value of the timezone record component.
    Returns the value of the timezoneAbbreviation record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the utcOffsetSeconds record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WeatherDTO

      public WeatherDTO(double latitude, double longitude, double generationTimeMs, int utcOffsetSeconds, String timezone, String timezoneAbbreviation, double elevation, web.sportflow.weather.HourlyUnits hourlyUnits, web.sportflow.weather.Hourly hourly)
      Creates an instance of a WeatherDTO record class.
      Parameters:
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      generationTimeMs - the value for the generationTimeMs record component
      utcOffsetSeconds - the value for the utcOffsetSeconds record component
      timezone - the value for the timezone record component
      timezoneAbbreviation - the value for the timezoneAbbreviation record component
      elevation - the value for the elevation record component
      hourlyUnits - the value for the hourlyUnits record component
      hourly - the value for the hourly record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • latitude

      public double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • generationTimeMs

      public double generationTimeMs()
      Returns the value of the generationTimeMs record component.
      Returns:
      the value of the generationTimeMs record component
    • utcOffsetSeconds

      public int utcOffsetSeconds()
      Returns the value of the utcOffsetSeconds record component.
      Returns:
      the value of the utcOffsetSeconds record component
    • timezone

      public String timezone()
      Returns the value of the timezone record component.
      Returns:
      the value of the timezone record component
    • timezoneAbbreviation

      public String timezoneAbbreviation()
      Returns the value of the timezoneAbbreviation record component.
      Returns:
      the value of the timezoneAbbreviation record component
    • elevation

      public double elevation()
      Returns the value of the elevation record component.
      Returns:
      the value of the elevation record component
    • hourlyUnits

      public web.sportflow.weather.HourlyUnits hourlyUnits()
      Returns the value of the hourlyUnits record component.
      Returns:
      the value of the hourlyUnits record component
    • hourly

      public web.sportflow.weather.Hourly hourly()
      Returns the value of the hourly record component.
      Returns:
      the value of the hourly record component