public enum VillagerProfession extends Enum<VillagerProfession>
Enum Constant and Description |
---|
BLACKSMITH
Blacksmith
|
BUTCHER
Butcher
|
FARMER
Farmer
|
LIBRARIAN
Librarian
|
PRIEST
Priest
|
Modifier and Type | Method and Description |
---|---|
int |
asInt()
Returns the
int value of the VillagerProfession |
static VillagerProfession |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static VillagerProfession[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final VillagerProfession FARMER
public static final VillagerProfession LIBRARIAN
public static final VillagerProfession PRIEST
public static final VillagerProfession BLACKSMITH
public static final VillagerProfession BUTCHER
public static VillagerProfession[] values()
for (VillagerProfession c : VillagerProfession.values()) System.out.println(c);
public static VillagerProfession 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 int asInt()
int
value of the VillagerProfessionint
value of the VillagerProfessionCopyright © 2016. All rights reserved.