Record Class WeatherApiService.WeatherNow
java.lang.Object
java.lang.Record
com.serinity.exercicecontrol.service.api.WeatherApiService.WeatherNow
- Enclosing class:
WeatherApiService
public static record WeatherApiService.WeatherNow(double temperatureC, double windKph, double precipitationMm, boolean isRaining)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionWeatherNow(double temperatureC, double windKph, double precipitationMm, boolean isRaining) Creates an instance of aWeatherNowrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisRainingrecord component.doubleReturns the value of theprecipitationMmrecord component.doubleReturns the value of thetemperatureCrecord component.final StringtoString()Returns a string representation of this record class.doublewindKph()Returns the value of thewindKphrecord component.
-
Constructor Details
-
WeatherNow
public WeatherNow(double temperatureC, double windKph, double precipitationMm, boolean isRaining) Creates an instance of aWeatherNowrecord class.- Parameters:
temperatureC- the value for thetemperatureCrecord componentwindKph- the value for thewindKphrecord componentprecipitationMm- the value for theprecipitationMmrecord componentisRaining- the value for theisRainingrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
temperatureC
public double temperatureC()Returns the value of thetemperatureCrecord component.- Returns:
- the value of the
temperatureCrecord component
-
windKph
public double windKph()Returns the value of thewindKphrecord component.- Returns:
- the value of the
windKphrecord component
-
precipitationMm
public double precipitationMm()Returns the value of theprecipitationMmrecord component.- Returns:
- the value of the
precipitationMmrecord component
-
isRaining
public boolean isRaining()Returns the value of theisRainingrecord component.- Returns:
- the value of the
isRainingrecord component
-