public enum MovieRating extends Enum<MovieRating>
Modifier and Type | Method and Description |
---|---|
static MovieRating |
getFromMpaa(String mpaa) |
String |
mpaa() |
static MovieRating |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MovieRating[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MovieRating G
public static final MovieRating PG
public static final MovieRating PG13
public static final MovieRating R
public static final MovieRating NC17
private final String mpaa
public static MovieRating[] values()
for (MovieRating c : MovieRating.values()) System.out.println(c);
public static MovieRating valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String mpaa()
public static MovieRating getFromMpaa(String mpaa)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.