Package org.localify.user.support
Record Class EmailEventPair
java.lang.Object
java.lang.Record
org.localify.user.support.EmailEventPair
- Record Components:
cityId- The ID of the city.cityName- The name of the city.newEvent- A new event.upcomingEvent- An upcoming event.
public record EmailEventPair(UUID cityId, String cityName, @Nullable RecommendedEventDto newEvent, @Nullable RecommendedEventDto upcomingEvent)
extends Record
Represents a pair of events for an email.
-
Constructor Summary
ConstructorsConstructorDescriptionEmailEventPair(UUID cityId, String cityName, RecommendedEventDto newEvent, RecommendedEventDto upcomingEvent) Creates an instance of aEmailEventPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncityId()Returns the value of thecityIdrecord component.cityName()Returns the value of thecityNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.newEvent()Returns the value of thenewEventrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupcomingEventrecord component.
-
Constructor Details
-
EmailEventPair
public EmailEventPair(UUID cityId, String cityName, @Nullable RecommendedEventDto newEvent, @Nullable RecommendedEventDto upcomingEvent) Creates an instance of aEmailEventPairrecord class.- Parameters:
cityId- the value for thecityIdrecord componentcityName- the value for thecityNamerecord componentnewEvent- the value for thenewEventrecord componentupcomingEvent- the value for theupcomingEventrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
cityId
Returns the value of thecityIdrecord component.- Returns:
- the value of the
cityIdrecord component
-
cityName
Returns the value of thecityNamerecord component.- Returns:
- the value of the
cityNamerecord component
-
newEvent
Returns the value of thenewEventrecord component.- Returns:
- the value of the
newEventrecord component
-
upcomingEvent
Returns the value of theupcomingEventrecord component.- Returns:
- the value of the
upcomingEventrecord component
-