Enum Constant and Description |
---|
APRIL |
AUGUST |
DECEMBER |
FEBRUARY |
JANUARY |
JULY |
JUNE |
MARCH |
MAY |
NOVEMBER |
OCTOBER |
SEPTEMBER |
Modifier and Type | Field and Description |
---|---|
int |
_leapYearLength |
int |
_length |
java.lang.String |
_name |
Modifier and Type | Method and Description |
---|---|
boolean |
isLeapYearAffected() |
int |
length(boolean isLeapYear) |
java.lang.String |
toString() |
static Month |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Month[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Month JANUARY
public static final Month FEBRUARY
public static final Month MARCH
public static final Month APRIL
public static final Month MAY
public static final Month JUNE
public static final Month JULY
public static final Month AUGUST
public static final Month SEPTEMBER
public static final Month OCTOBER
public static final Month NOVEMBER
public static final Month DECEMBER
public final java.lang.String _name
public final int _length
public final int _leapYearLength
public static Month[] values()
for (Month c : Month.values()) System.out.println(c);
public static Month valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<Month>
public int length(boolean isLeapYear)
public boolean isLeapYearAffected()