public class WeekDay extends Object
Represents a weekday which either defines regular days of a week or exception days in a calendar.
Constructor and Description |
---|
WeekDay()
Initializes a new instance of the
WeekDay class. |
WeekDay(int dayType)
Initializes a new instance of the
WeekDay class with the specified day type. |
WeekDay(int dayType,
List<WorkingTime> workingTimes)
Initializes a new instance of the
WeekDay class with the specified day type and list of working time
periods. |
Modifier and Type | Method and Description |
---|---|
static int |
castToDayType(int dw)
|
static WeekDay |
createDefaultWorkingDay(int dayType)
Creates default working day.
|
WeekDay |
deepClone()
Returns a deep copy of the week day.
|
boolean |
equals(Object obj)
Returns a value indicating whether this instance is equal to a specified object.
|
int |
getDayType()
Gets the type of a day.
|
boolean |
getDayWorking()
Gets a value indicating whether the specified date or day type is working.
|
Date |
getFromDate()
Gets the beginning of an exception time.
|
Date |
getToDate()
Gets the end of an exception time.
|
double |
getWorkingTime()
Returns the working time for a week day.
|
WorkingTimeCollection |
getWorkingTimes()
Gets WorkingTimeCollection for this WeekDay instance.
|
int |
hashCode()
Returns a hash code value for the instance of the
WeekDay class. |
void |
setDayWorking(boolean value)
Sets a value indicating whether the specified date or day type is working.
|
static void |
setDefaultWorkingTime(WeekDay day)
Sets default time periods for the specified week day.
|
void |
setFromDate(Date value)
Sets the beginning of an exception time.
|
void |
setToDate(Date value)
Sets the end of an exception time.
|
public WeekDay(int dayType)
Initializes a new instance of the WeekDay
class with the specified day type.
dayType
- The specified day type.public WeekDay(int dayType, List<WorkingTime> workingTimes)
Initializes a new instance of the WeekDay
class with the specified day type and list of working time
periods.
dayType
- The specified day type.workingTimes
- List of working time periods.public WeekDay()
Initializes a new instance of the WeekDay
class.
public static int castToDayType(int dw)
Casts .Net's DayOfWeek
to DayType
(getDayType()
/setDayType(int)
).
dw
- The day of week to cast from.public static WeekDay createDefaultWorkingDay(int dayType)
Creates default working day.
dayType
- The day type to create default working day from.public final WeekDay deepClone()
Returns a deep copy of the week day.
public boolean equals(Object obj)
Returns a value indicating whether this instance is equal to a specified object.
public final int getDayType()
Gets the type of a day.
Read/write DayType
.
public final boolean getDayWorking()
Gets a value indicating whether the specified date or day type is working.
Read/write boolean
.
public final void setDayWorking(boolean value)
Sets a value indicating whether the specified date or day type is working.
Read/write boolean
.
value
- a value indicating whether the specified date or day type is working.public final Date getFromDate()
Gets the beginning of an exception time.
Read/write Date
.
public final void setFromDate(Date value)
Sets the beginning of an exception time.
Read/write Date
.
value
- the beginning of an exception time.public final Date getToDate()
Gets the end of an exception time.
Read/write Date
.
public final void setToDate(Date value)
Sets the end of an exception time.
Read/write Date
.
value
- the end of an exception time.public final double getWorkingTime()
Returns the working time for a week day.
public final WorkingTimeCollection getWorkingTimes()
Gets WorkingTimeCollection for this WeekDay instance. The collection of working times that define the time worked on the weekday.
public int hashCode()
Returns a hash code value for the instance of the WeekDay
class.
public static void setDefaultWorkingTime(WeekDay day)
Sets default time periods for the specified week day.
day
- The week day to set default working day on.Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.