Package dev.reuss.tmdb.common.image
Record Class TmdbImage
java.lang.Object
java.lang.Record
dev.reuss.tmdb.common.image.TmdbImage
- Record Components:
aspectRatio- image aspect ratioheight- image height in pixelsiso6391- optional ISO 639-1 language codefilePath- TMDB image file pathvoteAverage- average image votevoteCount- image vote countwidth- image width in pixels
- All Implemented Interfaces:
TmdbModel,Serializable
public record TmdbImage(double aspectRatio, int height, String iso6391, String filePath, double voteAverage, int voteCount, int width)
extends Record
implements TmdbModel
Represents image metadata returned by TMDB.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaspectRatiorecord component.final booleanIndicates whether some other object is "equal to" this one.filePath()Returns the value of thefilePathrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.iso6391()Returns the value of theiso6391record component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thevoteAveragerecord component.intReturns the value of thevoteCountrecord component.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
TmdbImage
public TmdbImage(double aspectRatio, int height, String iso6391, String filePath, double voteAverage, int voteCount, int width) Creates an instance of aTmdbImagerecord class.- Parameters:
aspectRatio- the value for theaspectRatiorecord componentheight- the value for theheightrecord componentiso6391- the value for theiso6391record componentfilePath- the value for thefilePathrecord componentvoteAverage- the value for thevoteAveragerecord componentvoteCount- the value for thevoteCountrecord componentwidth- the value for thewidthrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
aspectRatio
public double aspectRatio()Returns the value of theaspectRatiorecord component.- Returns:
- the value of the
aspectRatiorecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
iso6391
Returns the value of theiso6391record component.- Returns:
- the value of the
iso6391record component
-
filePath
Returns the value of thefilePathrecord component.- Returns:
- the value of the
filePathrecord component
-
voteAverage
public double voteAverage()Returns the value of thevoteAveragerecord component.- Returns:
- the value of the
voteAveragerecord component
-
voteCount
public int voteCount()Returns the value of thevoteCountrecord component.- Returns:
- the value of the
voteCountrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-