Package org.localify.user.dto
Record Class UserHistoryResponse
java.lang.Object
java.lang.Record
org.localify.user.dto.UserHistoryResponse
- Record Components:
artists- The user's recently viewed artists.events- The user's recently viewed events.venues- The user's recently viewed venues.
public record UserHistoryResponse(List<UserHistoryResponse.HistoryArtistResponse> artists, List<UserHistoryResponse.HistoryEventResponse> events, List<UserHistoryResponse.HistoryVenueResponse> venues)
extends Record
Represents a user's view history.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a recently viewed artist.static final recordRepresents a recently viewed event.static final recordRepresents a recently viewed venue. -
Constructor Summary
ConstructorsConstructorDescriptionUserHistoryResponse(List<UserHistoryResponse.HistoryArtistResponse> artists, List<UserHistoryResponse.HistoryEventResponse> events, List<UserHistoryResponse.HistoryVenueResponse> venues) Creates an instance of aUserHistoryResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionartists()Returns the value of theartistsrecord component.final booleanIndicates whether some other object is "equal to" this one.events()Returns the value of theeventsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.venues()Returns the value of thevenuesrecord component.
-
Constructor Details
-
UserHistoryResponse
public UserHistoryResponse(List<UserHistoryResponse.HistoryArtistResponse> artists, List<UserHistoryResponse.HistoryEventResponse> events, List<UserHistoryResponse.HistoryVenueResponse> venues) Creates an instance of aUserHistoryResponserecord class.
-
-
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). -
artists
Returns the value of theartistsrecord component.- Returns:
- the value of the
artistsrecord component
-
events
Returns the value of theeventsrecord component.- Returns:
- the value of the
eventsrecord component
-
venues
Returns the value of thevenuesrecord component.- Returns:
- the value of the
venuesrecord component
-