de.bripkens.gravatar
Enum DefaultImage

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

public enum DefaultImage
extends Enum<DefaultImage>

A default avatar can be received in case there is no avatar for an email address, when the avatar is not appropriate for the audience (due to the rating) or when you force default avatar retrieval. Default image descriptions were taken from the Gravatar website.

Author:
Ben Ripkens

Enum Constant Summary
HTTP_404
          Return an HTTP 404 error.
IDENTICON
          A geometric pattern based on an email hash.
MONSTER
          A generated 'monster' with different colors, faces, etc.
MYSTERY_MAN
          A simple, cartoon-style silhouetted outline of a person (does not vary by email hash).
RETRO
          Awesome generated, 8-bit arcade-style pixelated faces.
WAVATAR
          Generated faces with differing features and backgrounds
 
Method Summary
static DefaultImage valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DefaultImage[] 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

HTTP_404

public static final DefaultImage HTTP_404
Return an HTTP 404 error.


MYSTERY_MAN

public static final DefaultImage MYSTERY_MAN
A simple, cartoon-style silhouetted outline of a person (does not vary by email hash).


IDENTICON

public static final DefaultImage IDENTICON
A geometric pattern based on an email hash.


MONSTER

public static final DefaultImage MONSTER
A generated 'monster' with different colors, faces, etc.


WAVATAR

public static final DefaultImage WAVATAR
Generated faces with differing features and backgrounds


RETRO

public static final DefaultImage RETRO
Awesome generated, 8-bit arcade-style pixelated faces.

Method Detail

values

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

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

valueOf

public static DefaultImage 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.