org.springframework.social.facebook.api
Enum AgeRange
java.lang.Object
java.lang.Enum<AgeRange>
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.
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
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 agemax
- The maximum age
- Returns:
- an AgeRange