Record Class StoryAreaTypeWeather
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.StoryAreaTypeWeather
- All Implemented Interfaces:
Serializable,ApiResult,StoryAreaType
public record StoryAreaTypeWeather(float temperature, @NotNull String emoji, @NotNull Color backgroundColor)
extends Record
implements StoryAreaType
- See Also:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.StoryAreaType
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionStoryAreaTypeWeather(float temperature, @NotNull String emoji, @NotNull Color backgroundColor) Creates an instance of aStoryAreaTypeWeatherrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull ColorReturns the value of thebackgroundColorrecord component.@NotNull Stringemoji()Returns the value of theemojirecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thetemperaturerecord component.final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
StoryAreaTypeWeather
public StoryAreaTypeWeather(float temperature, @NotNull @NotNull String emoji, @NotNull @NotNull Color backgroundColor) Creates an instance of aStoryAreaTypeWeatherrecord class.- Parameters:
temperature- the value for thetemperaturerecord componentemoji- the value for theemojirecord componentbackgroundColor- the value for thebackgroundColorrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceStoryAreaType
-
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 '=='. -
temperature
public float temperature()Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
emoji
Returns the value of theemojirecord component.- Returns:
- the value of the
emojirecord component
-
backgroundColor
Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-