Record Class Link.Preview
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.reddit.dto.Link.Preview
- Record Components:
images- the list of images in the previewenabled- indicates if the preview is enabledredditVideoPreview- the Reddit video preview, if available
- Enclosing class:
Link
public static record Link.Preview(List<Link.Metadata> images, Boolean enabled, Link.RedditVideo redditVideoPreview)
extends Record
Represents the preview data for a Reddit post.
-
Constructor Summary
ConstructorsConstructorDescriptionPreview(List<Link.Metadata> images, Boolean enabled, Link.RedditVideo redditVideoPreview) Creates an instance of aPreviewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.images()Returns the value of theimagesrecord component.Returns the value of theredditVideoPreviewrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Preview
Creates an instance of aPreviewrecord class.- Parameters:
images- the value for theimagesrecord componentenabled- the value for theenabledrecord componentredditVideoPreview- the value for theredditVideoPreviewrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
images
-
enabled
-
redditVideoPreview
Returns the value of theredditVideoPreviewrecord component.- Returns:
- the value of the
redditVideoPreviewrecord component
-