Package com.mcawful.social
Record Class SocialLinkCard
java.lang.Object
java.lang.Record
com.mcawful.social.SocialLinkCard
- Record Components:
uri- the address the card links totitle- the title shown on the carddescription- the text shown under the titlethumbnailUrl- the address of the picture shown on the card;nullor empty for none
public record SocialLinkCard(String uri, String title, String description, String thumbnailUrl)
extends Record
A link preview attached to a post
- Author:
- mcawful
-
Constructor Summary
ConstructorsConstructorDescriptionSocialLinkCard(String uri, String title, String description, String thumbnailUrl) Creates an instance of aSocialLinkCardrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord 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 thethumbnailUrlrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.
-
Constructor Details
-
SocialLinkCard
Creates an instance of aSocialLinkCardrecord class.- Parameters:
uri- the value for theurirecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentthumbnailUrl- the value for thethumbnailUrlrecord 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). -
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
thumbnailUrl
Returns the value of thethumbnailUrlrecord component.- Returns:
- the value of the
thumbnailUrlrecord component
-