public enum Coal extends Enum<Coal>
| Enum Constant and Description |
|---|
CHARCOAL
Represents a charcoal item.
|
REGULAR
Represents a regular coal item.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCharcoal()
Returns whether or not this item is charcoal.
|
String |
toString() |
static Coal |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Coal[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Coal REGULAR
public static final Coal CHARCOAL
public static Coal[] values()
for (Coal c : Coal.values()) System.out.println(c);
public static Coal 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 final boolean isCharcoal()
Copyright © 2020. All rights reserved.