org.springframework.social.facebook.api
Enum AgeRange

java.lang.Object
  extended by java.lang.Enum<AgeRange>
      extended by org.springframework.social.facebook.api.AgeRange
All Implemented Interfaces:
Serializable, Comparable<AgeRange>

public enum AgeRange
extends Enum<AgeRange>

Enum representing a user's age range.


Enum Constant Summary
AGE_13_17
           
AGE_18_20
           
AGE_21_PLUS
           
UNKNOWN
           
 
Method Summary
static AgeRange fromMinMax(Integer min, Integer max)
          Constructs an AgeRange from the min/max age values.
 Integer getMax()
           
 Integer getMin()
           
static AgeRange valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AgeRange[] 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

UNKNOWN

public static final AgeRange UNKNOWN

AGE_13_17

public static final AgeRange AGE_13_17

AGE_18_20

public static final AgeRange AGE_18_20

AGE_21_PLUS

public static final AgeRange AGE_21_PLUS
Method Detail

values

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

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

valueOf

public static AgeRange 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

getMin

public Integer getMin()
Returns:
The minimum integer value for the range (possibly null).

getMax

public Integer getMax()
Returns:
The maximum integer value for the range (possibly null).

fromMinMax

public static AgeRange fromMinMax(Integer min,
                                  Integer max)
Constructs an AgeRange from the min/max age values.

Parameters:
min - The minimum age
max - The maximum age
Returns:
an AgeRange