Package nl.vpro.domain.media
Enum ContentRating
- java.lang.Object
-
- java.lang.Enum<ContentRating>
-
- nl.vpro.domain.media.ContentRating
-
- All Implemented Interfaces:
Serializable
,Comparable<ContentRating>
,Displayable
public enum ContentRating extends Enum<ContentRating> implements Displayable
A NICAM content rating- Author:
- Michiel Meeuwissen
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANGST
DISCRIMINATIE
DRUGS_EN_ALCOHOL
GEWELD
GROF_TAALGEBRUIK
SEKS
-
Field Summary
-
Fields inherited from interface nl.vpro.i18n.Displayable
NULL
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
Optional<String>
getIcon()
Optional<String>
getIconClass()
char
toChar()
static ContentRating
valueOf(char c)
Returns the enum constant of this type with the specified name.static ContentRating
valueOf(String name)
Returns the enum constant of this type with the specified name.static List<ContentRating>
valueOf(List<String> list)
Returns the enum constant of this type with the specified name.static ContentRating[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface nl.vpro.i18n.Displayable
display, getDisplayName, getPluralDisplayName, getPluralDisplayName
-
-
-
-
Enum Constant Detail
-
DISCRIMINATIE
public static final ContentRating DISCRIMINATIE
-
GROF_TAALGEBRUIK
public static final ContentRating GROF_TAALGEBRUIK
-
ANGST
public static final ContentRating ANGST
-
GEWELD
public static final ContentRating GEWELD
-
SEKS
public static final ContentRating SEKS
-
DRUGS_EN_ALCOHOL
public static final ContentRating DRUGS_EN_ALCOHOL
-
-
Method Detail
-
values
public static ContentRating[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ContentRating c : ContentRating.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContentRating valueOf(String name)
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
-
toChar
public char toChar()
-
valueOf
public static ContentRating valueOf(char c)
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:
c
- 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
-
valueOf
public static List<ContentRating> valueOf(List<String> list)
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:
list
- 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
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceDisplayable
-
getIcon
public Optional<String> getIcon()
- Specified by:
getIcon
in interfaceDisplayable
-
getIconClass
public Optional<String> getIconClass()
- Specified by:
getIconClass
in interfaceDisplayable
-
-