|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<WeekDay>
com.antelmann.calendar.WeekDay
public enum WeekDay
represents the days in a week with localized strings
Month| Enum Constant Summary | |
|---|---|
FRIDAY
|
|
MONDAY
|
|
SATURDAY
|
|
SUNDAY
|
|
THURSDAY
|
|
TUESDAY
|
|
WEDNESDAY
|
|
| Method Summary | |
|---|---|
boolean |
appliesTo(Date date)
|
static WeekDay |
fromDate(Date date)
|
static WeekDay |
fromDate(Date date,
Calendar cal)
|
static WeekDay |
fromInt(int weekDay)
|
String |
getName(Locale l)
|
int |
intValue()
corresponds to the constants used in Calendar |
boolean |
isWeekend()
|
Date |
next(Date date)
if, for example, this is Monday, this method returns the next Monday seen from the given date. |
Date |
next(Date date,
Calendar cal)
|
Date |
previous(Date date)
if, for example, this is Monday, this method returns the previous Monday seen from the given date. |
Date |
previous(Date date,
Calendar cal)
|
String |
toString()
|
static WeekDay |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static WeekDay[] |
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, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final WeekDay MONDAY
public static final WeekDay TUESDAY
public static final WeekDay WEDNESDAY
public static final WeekDay THURSDAY
public static final WeekDay FRIDAY
public static final WeekDay SATURDAY
public static final WeekDay SUNDAY
| Method Detail |
|---|
public static WeekDay[] values()
for (WeekDay c : WeekDay.values()) System.out.println(c);
public static WeekDay valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic boolean isWeekend()
public boolean appliesTo(Date date)
public Date next(Date date)
public Date next(Date date,
Calendar cal)
public Date previous(Date date)
public Date previous(Date date,
Calendar cal)
public int intValue()
Calendar
public static WeekDay fromInt(int weekDay)
throws IllegalArgumentException
IllegalArgumentExceptionpublic static WeekDay fromDate(Date date)
public static WeekDay fromDate(Date date,
Calendar cal)
public String getName(Locale l)
public String toString()
toString in class Enum<WeekDay>
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||