Package org.localify.artist.dto
Record Class ArtistEventListResponse
java.lang.Object
java.lang.Record
org.localify.artist.dto.ArtistEventListResponse
- Record Components:
nearbyEvents- A list of events near the user's location.otherEvents- A list of events not near the user's location.city- The user's city, if available.
public record ArtistEventListResponse(List<EventResponseExtended> nearbyEvents, List<EventResponseExtended> otherEvents, CityResponse city)
extends Record
Represents the response for a list of an artist's events.
The events are separated into nearby and other events.
-
Constructor Summary
ConstructorsConstructorDescriptionArtistEventListResponse(List<EventResponseExtended> nearbyEvents, List<EventResponseExtended> otherEvents, CityResponse city) Creates an instance of aArtistEventListResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncity()Returns the value of thecityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenearbyEventsrecord component.Returns the value of theotherEventsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArtistEventListResponse
public ArtistEventListResponse(List<EventResponseExtended> nearbyEvents, List<EventResponseExtended> otherEvents, CityResponse city) Creates an instance of aArtistEventListResponserecord class.- Parameters:
nearbyEvents- the value for thenearbyEventsrecord componentotherEvents- the value for theotherEventsrecord componentcity- the value for thecityrecord 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). -
nearbyEvents
Returns the value of thenearbyEventsrecord component.- Returns:
- the value of the
nearbyEventsrecord component
-
otherEvents
Returns the value of theotherEventsrecord component.- Returns:
- the value of the
otherEventsrecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-