Package su.onno.ui.comments
Record Class MentionResolver.ResolvedMention
java.lang.Object
java.lang.Record
su.onno.ui.comments.MentionResolver.ResolvedMention
- Enclosing class:
MentionResolver
public static record MentionResolver.ResolvedMention(String kind, String name, UUID id, String display, String avatarUrl, String entity, boolean readable)
extends Record
A mention resolved for one viewer: identity + (when readable) its live display and avatar.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavatarUrlrecord component.display()Returns the value of thedisplayrecord component.entity()Returns the value of theentityrecord component.final 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.kind()Returns the value of thekindrecord component.name()Returns the value of thenamerecord component.booleanreadable()Returns the value of thereadablerecord component.toJson()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResolvedMention
public ResolvedMention(String kind, String name, UUID id, String display, String avatarUrl, String entity, boolean readable) Creates an instance of aResolvedMentionrecord class.- Parameters:
kind- the value for thekindrecord componentname- the value for thenamerecord componentid- the value for theidrecord componentdisplay- the value for thedisplayrecord componentavatarUrl- the value for theavatarUrlrecord componententity- the value for theentityrecord componentreadable- the value for thereadablerecord component
-
-
Method Details
-
toJson
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
avatarUrl
Returns the value of theavatarUrlrecord component.- Returns:
- the value of the
avatarUrlrecord component
-
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
readable
public boolean readable()Returns the value of thereadablerecord component.- Returns:
- the value of the
readablerecord component
-