Record Class Link.Resolution
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.reddit.dto.Link.Resolution
- Record Components:
url- the URL of the image or videowidth- the width of the image or videoheight- the height of the image or videogif- the GIF variant, if availablemp4- the MP4 variant, if available
- All Implemented Interfaces:
Comparable<Link.Resolution>
- Enclosing class:
Link
public static record Link.Resolution(URL url, Integer width, Integer height, URL gif, URL mp4)
extends Record
implements Comparable<Link.Resolution>
Represents a resolution of an image or video.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Link.Resolution resolution) final booleanIndicates whether some other object is "equal to" this one.gif()Returns the value of thegifrecord component.final inthashCode()Returns a hash code value for this object.height()Returns the value of theheightrecord component.mp4()Returns the value of themp4record component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.width()Returns the value of thewidthrecord component.
-
Constructor Details
-
Resolution
Creates an instance of aResolutionrecord class.
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<Link.Resolution>
-
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). -
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
width
Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
gif
Returns the value of thegifrecord component.- Returns:
- the value of the
gifrecord component
-
mp4
Returns the value of themp4record component.- Returns:
- the value of the
mp4record component
-