public enum Month extends Enum<Month> implements SimpleDatatype<Integer>
Enum Constant and Description |
---|
APRIL
The according month.
|
AUGUST
The according month.
|
DECEMBER
The according month.
|
FEBRUARY
The according month.
|
JANUARY
The according month.
|
JULY
The according month.
|
JUNE
The according month.
|
MARCH
The according month.
|
MAY
The according month.
|
NOVEMBER
The according month.
|
OCTOBER
The according month.
|
SEPTEMBER
The according month.
|
Modifier and Type | Field and Description |
---|---|
private String |
title |
private Integer |
value |
Modifier and Type | Method and Description |
---|---|
static Month |
fromDate(Date date)
This method gets the
Month from the given date . |
static Month |
fromValue(Integer value)
This method gets the
DateUnit for the given value . |
int |
getMaxDays()
This method gets the maximum number of days in this
Month . |
int |
getMinDays()
This method gets the minimum number of days in this
Month . |
Integer |
getValue()
This method returns the raw value of this datatype.
|
String |
toString()
|
static Month |
valueOf(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 static Month[] values()
for (Month c : Month.values()) System.out.println(c);
public static Month 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 Integer getValue()
String
, Character
, Boolean
, any type of Number
, any type of java.time.LocalDate
, etc.).
ATTENTION:Calendar
this will return the natural representation of a Month
in the range
from 1-12
.getValue
in interface AttributeReadValue<Integer>
getValue
in interface SimpleDatatype<Integer>
public int getMaxDays()
Month
.public int getMinDays()
Month
.public static Month fromValue(Integer value)
DateUnit
for the given value
.public String toString()
Datatype
String
representation of this Datatype
. While the general contract of
Object.toString()
is very weak and mainly used for debugging, the contract here is very strong. The
returned String
has to be suitable for end-users and official output to any kind of sink. NlsMessage
for
this purpose and implement NlsObject
if you want to support I18N/L10N.Copyright © 2001–2016 mmm-Team. All rights reserved.