Enum Constant and Description |
---|
FIVE_STARS |
FOUR_STARS |
ONE_STAR |
THREE_STARS |
TWO_STARS |
UNKNOWN |
ZERO_STARS |
Modifier and Type | Method and Description |
---|---|
int |
getValue()
Get the integer value of the rating.
|
static java.lang.String |
getValuesString()
Get a string of all the rating names.
|
static Rating |
valueOf(int value)
Get a rating by it's value.
|
static Rating |
valueOf(java.lang.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.
|
public static final Rating UNKNOWN
public static final Rating ZERO_STARS
public static final Rating ONE_STAR
public static final Rating TWO_STARS
public static final Rating THREE_STARS
public static final Rating FOUR_STARS
public static final Rating FIVE_STARS
public static Rating[] values()
for (Rating c : Rating.values()) System.out.println(c);
public static Rating valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static java.lang.String getValuesString()
public static Rating valueOf(int value)
public int getValue()