java.lang.Object
net.fortuna.ical4j.model.WeekDay
- All Implemented Interfaces:
Serializable
$Id$
Created: 19/12/2004
Defines a day of the week with a possible offset related to
a MONTHLY or YEARLY occurrence.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanstatic intgetCalendarDay(WeekDay weekday) Returns the correspondingjava.util.Calendar.DAY_OF_WEEKconstant for the specifiedWeekDay.final WeekDay.DaygetDay()static WeekDaygetDay(int calDay) Returns the corresponding day constant to the specified java.util.Calendar.DAY_OF_WEEK property.static DayOfWeekgetDayOfWeek(WeekDay weekday) static WeekDaygetMonthlyOffset(Calendar cal) Returns a weekday/offset representation of the specified calendar.static WeekDayReturns a weekday/negative offset representation of the specified calendar.final intstatic WeekDaygetWeekDay(DayOfWeek dayOfWeek) Returns a weekday representation of the specified day of week.static WeekDaygetWeekDay(Calendar cal) Returns a weekday representation of the specified calendar.static WeekDaygetWeekDay(WeekDay.Day day) final inthashCode()final StringtoString()
-
Field Details
-
SU
Sunday. -
MO
Monday. -
TU
Tuesday. -
WE
Wednesday. -
TH
Thursday. -
FR
Friday. -
SA
Saturday.
-
-
Constructor Details
-
WeekDay
- Parameters:
value- a string representation of a week day
-
WeekDay
Constructs a new weekday instance based on the specified instance and offset.- Parameters:
weekDay- a week day template for the instanceoffset- a month offset value
-
-
Method Details
-
getDay
- Returns:
- Returns the day.
-
getOffset
public final int getOffset()- Returns:
- Returns the offset.
-
toString
-
getWeekDay
-
getWeekDay
Returns a weekday representation of the specified calendar.- Parameters:
cal- a calendar (java.util)- Returns:
- a weekday instance representing the specified calendar
-
getWeekDay
Returns a weekday representation of the specified day of week.- Parameters:
dayOfWeek- day of the week- Returns:
- a weekday instance representing the specified calendar
-
getMonthlyOffset
Returns a weekday/offset representation of the specified calendar.- Parameters:
cal- a calendar (java.util)- Returns:
- a weekday instance representing the specified calendar
-
getNegativeMonthlyOffset
Returns a weekday/negative offset representation of the specified calendar.- Parameters:
cal- a calendar (java.util)- Returns:
- a weekday instance representing the specified calendar
-
getDay
Returns the corresponding day constant to the specified java.util.Calendar.DAY_OF_WEEK property.- Parameters:
calDay- a property value of java.util.Calendar.DAY_OF_WEEK- Returns:
- a string, or null if an invalid DAY_OF_WEEK property is specified
-
getCalendarDay
Returns the correspondingjava.util.Calendar.DAY_OF_WEEKconstant for the specifiedWeekDay.- Parameters:
weekday- a week day instance- Returns:
- the corresponding
java.util.Calendarday
-
getDayOfWeek
-
equals
-
hashCode
public final int hashCode()
-