|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<Months>
de.laliluna.date.Months
public enum Months
Enum representing the months of the year. There are converting methods from int to the enum and back. Finally you can get the english abbreviation or full name for the month.
| Enum Constant Summary | |
|---|---|
APR
|
|
AUG
|
|
DEC
|
|
FEB
|
|
JAN
|
|
JUL
|
|
JUN
|
|
MAR
|
|
MAY
|
|
NOV
|
|
OCT
|
|
SEP
|
|
| Field Summary | |
|---|---|
static java.lang.String[] |
names
|
static java.lang.String[] |
shortNames
|
| Method Summary | |
|---|---|
java.lang.String |
toName()
Returns an english month name of this instance |
java.lang.String |
toNameShort()
Returns a english abbreviation for the month name of this instance |
int |
toValue()
Returns the int value corresponding to the month 1 corresponds to JAN, 2 to FEB, ... |
static Months |
valueOf(int monthValue)
Returns the month enum corresponding to the value of monthValue
1 corresponds to JAN, 2 to FEB, ... |
static Months |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Months[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Months JAN
public static final Months FEB
public static final Months MAR
public static final Months APR
public static final Months MAY
public static final Months JUN
public static final Months JUL
public static final Months AUG
public static final Months SEP
public static final Months OCT
public static final Months NOV
public static final Months DEC
| Field Detail |
|---|
public static final java.lang.String[] shortNames
public static final java.lang.String[] names
| Method Detail |
|---|
public static Months[] values()
for (Months c : Months.values()) System.out.println(c);
public static Months 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 name
java.lang.NullPointerException - if the argument is nullpublic java.lang.String toNameShort()
public java.lang.String toName()
public static Months valueOf(int monthValue)
monthValue
1 corresponds to JAN, 2 to FEB, ...
monthValue - - value representing a month
public int toValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||