public static enum Villager.Profession extends Enum<Villager.Profession>
列挙型定数と説明 |
---|
BLACKSMITH |
BUTCHER |
FARMER |
LIBRARIAN |
PRIEST |
修飾子とタイプ | メソッドと説明 |
---|---|
int |
getId()
非推奨です。
Magic value
|
static Villager.Profession |
getProfession(int id)
非推奨です。
Magic value
|
static Villager.Profession |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static Villager.Profession[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final Villager.Profession FARMER
public static final Villager.Profession LIBRARIAN
public static final Villager.Profession PRIEST
public static final Villager.Profession BLACKSMITH
public static final Villager.Profession BUTCHER
public static Villager.Profession[] values()
for(Villager.Profession c: Villager.Profession.values()) System.out.println(c);
public static Villager.Profession valueOf(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- この列挙型に、指定した名前の定数がない場合NullPointerException
- 引数がnullの場合@Deprecated public int getId()
@Deprecated public static Villager.Profession getProfession(int id)
id
- ID of the profession to get.Copyright © 2016. All rights reserved.