Package dev.reuss.tmdb.query
Record Class ImageQuery
java.lang.Object
java.lang.Record
dev.reuss.tmdb.query.ImageQuery
- Record Components:
language- optional language filterincludeImageLanguage- optional comma-separated image language filter
- All Implemented Interfaces:
TmdbQuery,Serializable
public record ImageQuery(Language language, String includeImageLanguage)
extends Record
implements TmdbQuery
Query parameters for TMDB image requests.
Both filters are optional. A blank includeImageLanguage value is
rejected. Values are serialized as language and
include_image_language query parameters.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionImageQuery(Language language, String includeImageLanguage) Creates an instance of aImageQueryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theincludeImageLanguagerecord component.static ImageQueryincludeImageLanguage(String includeImageLanguage) Creates an image query using TMDB's image-language filter.language()Returns the value of thelanguagerecord component.static ImageQueryCreates an image query for a single response language.static ImageQuerynone()Creates an image query without filters.Converts this query to TMDB query parameters.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ImageQuery
Creates an instance of aImageQueryrecord class.- Parameters:
language- the value for thelanguagerecord componentincludeImageLanguage- the value for theincludeImageLanguagerecord component
-
-
Method Details
-
none
Creates an image query without filters.- Returns:
- empty image query
-
language
Creates an image query for a single response language.- Parameters:
language- response language- Returns:
- image query
- Throws:
NullPointerException- iflanguageisnull
-
includeImageLanguage
Creates an image query using TMDB's image-language filter.- Parameters:
includeImageLanguage- comma-separated image language filter- Returns:
- image query
- Throws:
IllegalArgumentException- ifincludeImageLanguageis blank
-
toQueryParams
Converts this query to TMDB query parameters.- Specified by:
toQueryParamsin interfaceTmdbQuery- Returns:
- query parameters
-
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). -
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
includeImageLanguage
Returns the value of theincludeImageLanguagerecord component.- Returns:
- the value of the
includeImageLanguagerecord component
-