Enum Class Movie.Genre

java.lang.Object
java.lang.Enum<Movie.Genre>
cs1302.oracle.model.Movie.Genre
All Implemented Interfaces:
Serializable, Comparable<Movie.Genre>, Constable
Enclosing class:
Movie

public static enum Movie.Genre extends Enum<Movie.Genre> implements Serializable
Represents a movie genre.
  • Enum Constant Details

    • MUSICAL

      public static final Movie.Genre MUSICAL
      Musical.
    • ANIMATION

      public static final Movie.Genre ANIMATION
      Animation.
    • MUSIC

      public static final Movie.Genre MUSIC
      Music.
    • BIOGRAPHY

      public static final Movie.Genre BIOGRAPHY
      Biography.
    • COMEDY

      public static final Movie.Genre COMEDY
      Comedy.
    • DRAMA

      public static final Movie.Genre DRAMA
      Drama.
    • WAR

      public static final Movie.Genre WAR
      War.
    • HISTORY

      public static final Movie.Genre HISTORY
      History.
    • SPORT

      public static final Movie.Genre SPORT
      Sport.
    • WESTERN

      public static final Movie.Genre WESTERN
      Western.
    • ADVENTURE

      public static final Movie.Genre ADVENTURE
      Adventure.
    • CRIME

      public static final Movie.Genre CRIME
      Crime.
    • ACTION

      public static final Movie.Genre ACTION
      Action.
    • MYSTERY

      public static final Movie.Genre MYSTERY
      Mystery.
    • SCI_FI

      public static final Movie.Genre SCI_FI
      Sci-Fi.
    • FAMILY

      public static final Movie.Genre FAMILY
      Family.
    • FANTASY

      public static final Movie.Genre FANTASY
      Fantasy.
    • HORROR

      public static final Movie.Genre HORROR
      Horror.
    • FILM_NOIR

      public static final Movie.Genre FILM_NOIR
      Film-Noir.
    • ROMANCE

      public static final Movie.Genre ROMANCE
      Romance.
    • THRILLER

      public static final Movie.Genre THRILLER
      Thriller.
  • Method Details

    • values

      public static Movie.Genre[] 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

      public static Movie.Genre valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • label

      public String label()
      Returns the human-readable label for this genre.
      Returns:
      the human-readable label for this genre
    • stream

      public static Stream<Movie.Genre> stream()
      Returns a sequential Stream<Genre> over all the values of this enum type.
      Returns:
      a stream over all values of this enum type
    • toGenre

      public static Movie.Genre toGenre(String label)
      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 null
      NoSuchElementException - if no such enum constant is present
    • toGenreList

      public static List<Movie.Genre> toGenreList(String... labels)
      Returns an unmodifiable list of genres with the specified labels. This method ignores case as well as both leading and trailing whitespace. of Genre 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