net.fortuna.ical4j.model
Class WeekDay
java.lang.Object
net.fortuna.ical4j.model.WeekDay
- Serializable
public class WeekDay
extends java.lang.Object
implements Serializable
$Id: WeekDay.java,v 1.11 2008/12/16 12:34:52 fortuna Exp $
Created: 19/12/2004
Defines a day of the week with a possible offset related to
a MONTHLY or YEARLY occurrence.
static WeekDay | FR
|
static WeekDay | MO
|
static WeekDay | SA
|
static WeekDay | SU
|
static WeekDay | TH
|
static WeekDay | TU
|
static WeekDay | WE
|
WeekDay(String value)
|
WeekDay(String day, int offset)
|
WeekDay(WeekDay weekDay, int offset) - Constructs a new weekday instance based on the specified
instance and offset.
|
boolean | equals(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 .
|
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(Calendar cal) - Returns a weekday/offset representation of the specified calendar.
|
static WeekDay | getNegativeMonthlyOffset(Calendar cal) - Returns a weekday/negative offset representation of the specified calendar.
|
int | getOffset()
|
static WeekDay | getWeekDay(Calendar cal) - Returns a weekday representation of the specified calendar.
|
int | hashCode() - Uses
HashCodeBuilder to build hashcode.
|
String | toString()
|
FR
public static final WeekDay FR
MO
public static final WeekDay MO
SA
public static final WeekDay SA
SU
public static final WeekDay SU
TH
public static final WeekDay TH
TU
public static final WeekDay TU
WE
public static final WeekDay WE
WeekDay
public WeekDay(String value)
WeekDay
public WeekDay(String day,
int offset)
WeekDay
public WeekDay(WeekDay weekDay,
int offset)
Constructs a new weekday instance based on the specified
instance and offset.
equals
public final boolean equals(Object arg0)
Uses ObjectUtils
to test equality.
getCalendarDay
public static int getCalendarDay(WeekDay weekday)
Returns the corresponding java.util.Calendar.DAY_OF_WEEK
constant for the specified WeekDay
.
getDay
public final String getDay()
getDay
public static WeekDay getDay(int calDay)
Returns the corresponding day constant to the specified
java.util.Calendar.DAY_OF_WEEK property.
calDay
- a property value of java.util.Calendar.DAY_OF_WEEK
- a string, or null if an invalid DAY_OF_WEEK property is
specified
getMonthlyOffset
public static final WeekDay getMonthlyOffset(Calendar cal)
Returns a weekday/offset representation of the specified calendar.
cal
- a calendar (java.util)
- a weekday instance representing the specified calendar
getNegativeMonthlyOffset
public static final WeekDay getNegativeMonthlyOffset(Calendar cal)
Returns a weekday/negative offset representation of the specified calendar.
cal
- a calendar (java.util)
- a weekday instance representing the specified calendar
getOffset
public final int getOffset()
getWeekDay
public static final WeekDay getWeekDay(Calendar cal)
Returns a weekday representation of the specified calendar.
cal
- a calendar (java.util)
- a weekday instance representing the specified calendar
hashCode
public final int hashCode()
Uses HashCodeBuilder
to build hashcode.
toString
public final String toString()