Package ejava.examples.javase5
Enum EnumTest.Day
- java.lang.Object
-
- java.lang.Enum<EnumTest.Day>
-
- ejava.examples.javase5.EnumTest.Day
-
- All Implemented Interfaces:
Serializable
,Comparable<EnumTest.Day>
- Enclosing class:
- EnumTest
private static enum EnumTest.Day extends Enum<EnumTest.Day>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Day()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EnumTest.Day
valueOf(String name)
Returns the enum constant of this type with the specified name.static EnumTest.Day[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUN
public static final EnumTest.Day SUN
-
MON
public static final EnumTest.Day MON
-
TUE
public static final EnumTest.Day TUE
-
WED
public static final EnumTest.Day WED
-
THU
public static final EnumTest.Day THU
-
FRI
public static final EnumTest.Day FRI
-
SAT
public static final EnumTest.Day SAT
-
-
Method Detail
-
values
public static EnumTest.Day[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EnumTest.Day c : EnumTest.Day.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EnumTest.Day valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-