public class WeekDay
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static WeekDay |
FR |
static WeekDay |
MO |
static WeekDay |
SA |
static WeekDay |
SU |
static WeekDay |
TH |
static WeekDay |
TU |
static WeekDay |
WE |
| Constructor and Description |
|---|
WeekDay(java.lang.String value) |
WeekDay(java.lang.String day,
int offset) |
WeekDay(WeekDay weekDay,
int offset)
Constructs a new weekday instance based on the specified
instance and offset.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object arg0)
Uses
ObjectUtils to test equality. |
static int |
getCalendarDay(WeekDay weekday)
Returns the corresponding
java.util.Calendar.DAY_OF_WEEK
constant for the specified WeekDay. |
java.lang.String |
getDay() |
static WeekDay |
getDay(int calDay)
Returns the corresponding day constant to the specified
java.util.Calendar.DAY_OF_WEEK property.
|
static WeekDay |
getMonthlyOffset(java.util.Calendar cal)
Returns a weekday/offset representation of the specified calendar.
|
static WeekDay |
getNegativeMonthlyOffset(java.util.Calendar cal)
Returns a weekday/negative offset representation of the specified calendar.
|
int |
getOffset() |
static WeekDay |
getWeekDay(java.util.Calendar cal)
Returns a weekday representation of the specified calendar.
|
int |
hashCode()
Uses
HashCodeBuilder to build hashcode. |
java.lang.String |
toString() |
public static final WeekDay SU
public static final WeekDay MO
public static final WeekDay TU
public static final WeekDay WE
public static final WeekDay TH
public static final WeekDay FR
public static final WeekDay SA
public WeekDay(java.lang.String value)
value - public WeekDay(java.lang.String day,
int offset)
day - offset - public WeekDay(WeekDay weekDay, int offset)
weekDay - offset - public final java.lang.String getDay()
public final int getOffset()
public final java.lang.String toString()
toString in class java.lang.Objectpublic static final WeekDay getWeekDay(java.util.Calendar cal)
cal - a calendar (java.util)public static final WeekDay getMonthlyOffset(java.util.Calendar cal)
cal - a calendar (java.util)public static final WeekDay getNegativeMonthlyOffset(java.util.Calendar cal)
cal - a calendar (java.util)public static WeekDay getDay(int calDay)
calDay - a property value of java.util.Calendar.DAY_OF_WEEKpublic static int getCalendarDay(WeekDay weekday)
java.util.Calendar.DAY_OF_WEEK
constant for the specified WeekDay.weekday - public final boolean equals(java.lang.Object arg0)
ObjectUtils to test equality.equals in class java.lang.Objectpublic final int hashCode()
HashCodeBuilder to build hashcode.hashCode in class java.lang.Object