Enum MediaType
- All Implemented Interfaces:
Serializable,Comparable<MediaType>
Defines the possible media types for trending resources.
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaTypeReturns the associatedMediaTypefor the given value.getValue()The media type value.static MediaTypeparseMediaTypeFromJson(com.google.gson.JsonElement rootElement) Helper method to parse themedia_typeattributes from aJsonElement.toString()static MediaTypeReturns the enum constant of this type with the specified name.static MediaType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MOVIE
-
PERSON
-
TV
-
TV_SEASON
-
TV_EPISODE
-
-
Field Details
-
MEDIA_TYPE_OBJ_NAME
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromValue
Returns the associatedMediaTypefor the given value.- Parameters:
value- the value- Returns:
- the media type reference
-
parseMediaTypeFromJson
Helper method to parse themedia_typeattributes from aJsonElement.- Parameters:
rootElement- the JSON object element- Returns:
- the media type reference
-
toString
-
getValue
The media type value.
-