Package org.localify.recommend.dto
Record Class RecSysArtistResponse
java.lang.Object
java.lang.Record
org.localify.recommend.dto.RecSysArtistResponse
- Record Components:
id- The ID of the artist.score- The recommendation score.percentMatch- The percentage match.recsplains- A list of explanations for the recommendation.
public record RecSysArtistResponse(UUID id, Double score, Double percentMatch, List<RecSysArtistResponse.Recsplain> recsplains)
extends Record
Represents a response from the recommendation system for an artist.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents an explanation for a recommendation, linking to a similar artist. -
Constructor Summary
ConstructorsConstructorDescriptionRecSysArtistResponse(UUID id, Double score, Double percentMatch, List<RecSysArtistResponse.Recsplain> recsplains) Creates an instance of aRecSysArtistResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thepercentMatchrecord component.Returns the value of therecsplainsrecord component.score()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecSysArtistResponse
public RecSysArtistResponse(@NonNull UUID id, @NonNull Double score, @NonNull Double percentMatch, @Nullable List<RecSysArtistResponse.Recsplain> recsplains) Creates an instance of aRecSysArtistResponserecord class.- Parameters:
id- the value for theidrecord componentscore- the value for thescorerecord componentpercentMatch- the value for thepercentMatchrecord componentrecsplains- the value for therecsplainsrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
percentMatch
Returns the value of thepercentMatchrecord component.- Returns:
- the value of the
percentMatchrecord component
-
recsplains
Returns the value of therecsplainsrecord component.- Returns:
- the value of the
recsplainsrecord component
-