public enum TestEnum extends Enum<TestEnum>
Enum Constant and Description |
---|
one
Second value (ordinal = 1).
|
two
Third value (ordinal = 2).
|
zero
First value (ordinal = 0).
|
Modifier and Type | Method and Description |
---|---|
static TestEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TestEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TestEnum zero
public static final TestEnum one
public static final TestEnum two
public static TestEnum[] values()
for (TestEnum c : TestEnum.values()) System.out.println(c);
public static TestEnum 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 nullCopyright © 2016 fastnate.org. All rights reserved.