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 Details

    • EmailEventPair

      public EmailEventPair(UUID cityId, String cityName, @Nullable RecommendedEventDto newEvent, @Nullable RecommendedEventDto upcomingEvent)
      Creates an instance of a EmailEventPair record class.
      Parameters:
      cityId - the value for the cityId record component
      cityName - the value for the cityName record component
      newEvent - the value for the newEvent record component
      upcomingEvent - the value for the upcomingEvent 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • cityId

      public UUID cityId()
      Returns the value of the cityId record component.
      Returns:
      the value of the cityId record component
    • cityName

      public String cityName()
      Returns the value of the cityName record component.
      Returns:
      the value of the cityName record component
    • newEvent

      @Nullable public RecommendedEventDto newEvent()
      Returns the value of the newEvent record component.
      Returns:
      the value of the newEvent record component
    • upcomingEvent

      @Nullable public RecommendedEventDto upcomingEvent()
      Returns the value of the upcomingEvent record component.
      Returns:
      the value of the upcomingEvent record component