public enum Enchantment extends Enum<Enchantment>
Modifier and Type | Method and Description |
---|---|
static Enchantment |
fromId(short id) |
static Enchantment |
fromName(String name) |
short |
id() |
String |
toString() |
static Enchantment |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Enchantment[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Enchantment[] values()
for (Enchantment c : Enchantment.values()) System.out.println(c);
public static Enchantment 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 Enchantment fromId(short id)
public static Enchantment fromName(String name)
public short id()
public String toString()
toString
in class Enum<Enchantment>
Copyright © 2016. All rights reserved.