Record Class Link.MediaEmbed
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.reddit.dto.Link.MediaEmbed
- Record Components:
content
- the content of the media embedheight
- the height of the media embedscrolling
- indicates if scrolling is enabled for the media embedwidth
- the width of the media embed
- Enclosing class:
Link
public static record Link.MediaEmbed(String content, Integer height, Boolean scrolling, Integer width)
extends Record
Represents the media embed information for a Reddit post.
This can include content, height, scrolling behavior, and width of the embedded media.
-
Constructor Summary
ConstructorsConstructorDescriptionMediaEmbed
(String content, Integer height, Boolean scrolling, Integer width) Creates an instance of aMediaEmbed
record class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()
Returns the value of thecontent
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.height()
Returns the value of theheight
record component.Returns the value of thescrolling
record component.final String
toString()
Returns a string representation of this record class.width()
Returns the value of thewidth
record component.
-
Constructor Details
-
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)
. -
content
Returns the value of thecontent
record component.- Returns:
- the value of the
content
record component
-
height
Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
scrolling
Returns the value of thescrolling
record component.- Returns:
- the value of the
scrolling
record component
-
width
Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-