public class Month extends Object implements Cloneable, Serializable, Comparable<Month>
Modifier and Type | Field and Description |
---|---|
static Month |
APRIL |
static Month |
AUGUST |
static Month |
DECEMBER |
static Month |
FEBRUARY |
static Month |
JANUARY |
static Month |
JULY |
static Month |
JUNE |
static Month |
MARCH |
static int |
MAX_MONTH_NUMBER |
static Month |
MAY |
static Month[] |
MONTH |
protected int |
monthNumber |
static Month |
NOVEMBER |
static int |
NUMBER_OF_MONTH |
static int[] |
NUMBERS_OF_DAYS |
static Month |
OCTOBER |
static Month |
SEPTEMBER |
Constructor and Description |
---|
Month(int monthNumber) |
Modifier and Type | Method and Description |
---|---|
boolean |
after(Month d) |
boolean |
afterOrEquals(Month d) |
boolean |
before(Month d) |
boolean |
beforeOrEquals(Month d) |
int |
compareTo(Month d) |
boolean |
equals(Object o) |
int |
getMonthNumber() |
static List<Month> |
getMonths(Month first,
Month last)
Return all month from first to last.
|
int |
getNumbersOfDays()
Get number of days.
|
int |
hashCode() |
Month |
next() |
Month |
previous() |
void |
setMonthNumber(int monthNumber) |
String |
toString() |
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 final Month[] MONTH
public static final int[] NUMBERS_OF_DAYS
public static final int NUMBER_OF_MONTH
public static final int MAX_MONTH_NUMBER
protected int monthNumber
public int getMonthNumber()
public void setMonthNumber(int monthNumber)
monthNumber
- The monthNumber to set.public Month next()
public Month previous()
public boolean before(Month d)
public boolean after(Month d)
public boolean beforeOrEquals(Month d)
public boolean afterOrEquals(Month d)
public int compareTo(Month d)
compareTo
in interface Comparable<Month>
public int getNumbersOfDays()
Copyright © 1999–2020 CodeLutin. All rights reserved.