de.bripkens.gravatar
Enum Rating

java.lang.Object
  extended by java.lang.Enum<Rating>
      extended by de.bripkens.gravatar.Rating
All Implemented Interfaces:
Serializable, Comparable<Rating>

public enum Rating
extends Enum<Rating>

Through ratings the retrieved avatars can be reduced to the ones appropriate for the targeted audience. These ratings are based on the Motion Picture Association of America film rating system. For more information read the Wikipedia article. The rating descriptions are taken from the Gravatar website.

Author:
Ben Ripkens

Enum Constant Summary
ADULT_ONLY
          Allow images for: May contain hardcore sexual imagery or extremely disturbing violence.
GENERAL_AUDIENCE
          Allow images for: Suitable for display on all websites with any audience type
PARENTAL_GUIDANCE_SUGGESTED
          Allow images for: May contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.
RESTRICTED
          Allow images for: May contain such things as harsh profanity, intense violence, nudity, or hard drug use.
 
Method Summary
static Rating valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Rating[] 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 class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GENERAL_AUDIENCE

public static final Rating GENERAL_AUDIENCE
Allow images for: Suitable for display on all websites with any audience type


PARENTAL_GUIDANCE_SUGGESTED

public static final Rating PARENTAL_GUIDANCE_SUGGESTED
Allow images for: May contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.


RESTRICTED

public static final Rating RESTRICTED
Allow images for: May contain such things as harsh profanity, intense violence, nudity, or hard drug use.


ADULT_ONLY

public static final Rating ADULT_ONLY
Allow images for: May contain hardcore sexual imagery or extremely disturbing violence.

Method Detail

values

public static Rating[] 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 (Rating c : Rating.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Rating 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 name
NullPointerException - if the argument is null


Copyright © 2011. All Rights Reserved.