public enum ChocolateEnum extends Enum<ChocolateEnum>
| Enum Constant and Description |
|---|
DARK
Represents dark.
|
FIRST_AVAILABLE
Represents first-available.
|
MILK
Represents milk.
|
| Modifier and Type | Method and Description |
|---|---|
int |
chocolateEnum()
Returns the attribute chocolateEnum.
|
static ChocolateEnum |
of(int value)
Returns the object of chocolateEnum for.
|
static ChocolateEnum |
of(String value)
Returns the object of chocolateEnum for.
|
String |
toString() |
static ChocolateEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ChocolateEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChocolateEnum DARK
public static final ChocolateEnum MILK
public static final ChocolateEnum FIRST_AVAILABLE
public static ChocolateEnum[] values()
for (ChocolateEnum c : ChocolateEnum.values()) System.out.println(c);
public static ChocolateEnum valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static ChocolateEnum of(int value)
value - value of chocolateEnum forpublic static ChocolateEnum of(String value)
value - value of chocolateEnum forpublic int chocolateEnum()
public String toString()
toString in class Enum<ChocolateEnum>Copyright © 2017. All rights reserved.