- All Implemented Interfaces:
Serializable
,Comparable<Movie.Genre>
,Constable
- Enclosing class:
- Movie
Represents a movie genre.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAction.Adventure.Animation.Biography.Comedy.Crime.Drama.Family.Fantasy.Film-Noir.History.Horror.Music.Musical.Mystery.Romance.Sci-Fi.Sport.Thriller.War.Western. -
Method Summary
Modifier and TypeMethodDescriptionlabel()
Returns the human-readablelabel
for this genre.static Stream<Movie.Genre>
stream()
Returns a sequentialStream<Genre>
over all the values of this enum type.static Movie.Genre
Returns the enum constant of this class with the specified label.static List<Movie.Genre>
toGenreList
(String... labels) Returns an unmodifiable list of genres with the specified labels.static Movie.Genre
Returns the enum constant of this class with the specified name.static Movie.Genre[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MUSICAL
Musical. -
ANIMATION
Animation. -
MUSIC
Music. -
BIOGRAPHY
Biography. -
COMEDY
Comedy. -
DRAMA
Drama. -
WAR
War. -
HISTORY
History. -
SPORT
Sport. -
WESTERN
Western. -
ADVENTURE
Adventure. -
CRIME
Crime. -
ACTION
Action. -
MYSTERY
Mystery. -
SCI_FI
Sci-Fi. -
FAMILY
Family. -
FANTASY
Fantasy. -
HORROR
Horror. -
FILM_NOIR
Film-Noir. -
ROMANCE
Romance. -
THRILLER
Thriller.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
label
Returns the human-readablelabel
for this genre.- Returns:
- the human-readable
label
for this genre
-
stream
Returns a sequentialStream<Genre>
over all the values of this enum type.- Returns:
- a stream over all values of this enum type
-
toGenre
Returns the enum constant of this class with the specified label. This method ignores case as well as both leading and trailing whitespace.- Parameters:
label
- the label of the enum constant to be returned- Returns:
- the enum constant with the specified label
- Throws:
NullPointerException
- if the argument is nullNoSuchElementException
- if no such enum constant is present
-
toGenreList
Returns an unmodifiable list of genres with the specified labels. This method ignores case as well as both leading and trailing whitespace. ofGenre
constants with the specified labels.- Parameters:
labels
- the labels of the enum constant to be returned- Returns:
- an unmodifiable list of enum constants with the specified labels
-