Package web.sportflow.weather
Record Class WeatherDTO
java.lang.Object
java.lang.Record
web.sportflow.weather.WeatherDTO
-
Constructor Summary
ConstructorsConstructorDescriptionWeatherDTO(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 aWeatherDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theelevationrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thegenerationTimeMsrecord component.final inthashCode()Returns a hash code value for this object.web.sportflow.weather.Hourlyhourly()Returns the value of thehourlyrecord component.web.sportflow.weather.HourlyUnitsReturns the value of thehourlyUnitsrecord component.doublelatitude()Returns the value of thelatituderecord component.doubleReturns the value of thelongituderecord component.timezone()Returns the value of thetimezonerecord component.Returns the value of thetimezoneAbbreviationrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theutcOffsetSecondsrecord component.
-
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 aWeatherDTOrecord class.- Parameters:
latitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentgenerationTimeMs- the value for thegenerationTimeMsrecord componentutcOffsetSeconds- the value for theutcOffsetSecondsrecord componenttimezone- the value for thetimezonerecord componenttimezoneAbbreviation- the value for thetimezoneAbbreviationrecord componentelevation- the value for theelevationrecord componenthourlyUnits- the value for thehourlyUnitsrecord componenthourly- the value for thehourlyrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
latitude
public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
generationTimeMs
public double generationTimeMs()Returns the value of thegenerationTimeMsrecord component.- Returns:
- the value of the
generationTimeMsrecord component
-
utcOffsetSeconds
public int utcOffsetSeconds()Returns the value of theutcOffsetSecondsrecord component.- Returns:
- the value of the
utcOffsetSecondsrecord component
-
timezone
Returns the value of thetimezonerecord component.- Returns:
- the value of the
timezonerecord component
-
timezoneAbbreviation
Returns the value of thetimezoneAbbreviationrecord component.- Returns:
- the value of the
timezoneAbbreviationrecord component
-
elevation
public double elevation()Returns the value of theelevationrecord component.- Returns:
- the value of the
elevationrecord component
-
hourlyUnits
public web.sportflow.weather.HourlyUnits hourlyUnits()Returns the value of thehourlyUnitsrecord component.- Returns:
- the value of the
hourlyUnitsrecord component
-
hourly
public web.sportflow.weather.Hourly hourly()Returns the value of thehourlyrecord component.- Returns:
- the value of the
hourlyrecord component
-