public abstract class ProjectCalendarDays extends Object
Modifier and Type | Field and Description |
---|---|
static LocalTimeRange |
DEFAULT_WORKING_AFTERNOON |
static LocalTimeRange |
DEFAULT_WORKING_MORNING
Constants representing the default working morning and afternoon hours.
|
Constructor and Description |
---|
ProjectCalendarDays() |
Modifier and Type | Method and Description |
---|---|
ProjectCalendarHours |
addCalendarHours(DayOfWeek day)
Used to add working hours to the calendar.
|
void |
addDefaultCalendarDays()
Convenience method to set up a standard working week.
|
void |
addDefaultCalendarHours()
This is a convenience method used to add a default set of calendar
hours to a calendar.
|
void |
addDefaultCalendarHours(DayOfWeek day)
This is a convenience method used to add a default set of calendar
hours to a calendar.
|
DayType |
getCalendarDayType(DayOfWeek day)
This method allows the retrieval of the actual working day flag,
which can take the values DEFAULT, WORKING, or NONWORKING.
|
DayType[] |
getCalendarDayTypes()
Retrieves an array of DayType instances representing a week,
where Sunday is the first entry in the array.
|
ProjectCalendarHours[] |
getCalendarHours()
Retrieves an array representing the working hours for each day of the week,
where Sunday is the first entry in the array.
|
ProjectCalendarHours |
getCalendarHours(DayOfWeek day)
This method retrieves the calendar hours for the specified day.
|
String |
getName()
Calendar name.
|
void |
removeCalendarHours(DayOfWeek day)
Used to remove working hours from the calendar.
|
void |
setCalendarDayType(DayOfWeek day,
DayType type)
Set the type of a given day.
|
void |
setName(String name)
Calendar name.
|
void |
setWorkingDay(DayOfWeek day,
boolean working)
This is a convenience method provided to allow the day type
to be set as working or non-working by supplying a simple Boolean argument.
|
public static final LocalTimeRange DEFAULT_WORKING_MORNING
public static final LocalTimeRange DEFAULT_WORKING_AFTERNOON
public void setName(String name)
name
- calendar namepublic String getName()
public ProjectCalendarHours[] getCalendarHours()
public ProjectCalendarHours getCalendarHours(DayOfWeek day)
day
- Day instancepublic void addDefaultCalendarHours()
public void addDefaultCalendarDays()
public void addDefaultCalendarHours(DayOfWeek day)
day
- Day for which to add default hours forpublic ProjectCalendarHours addCalendarHours(DayOfWeek day)
day
- target daypublic void removeCalendarHours(DayOfWeek day)
day
- target daypublic DayType[] getCalendarDayTypes()
public DayType getCalendarDayType(DayOfWeek day)
day
- required daypublic void setWorkingDay(DayOfWeek day, boolean working)
day
- required dayworking
- flag indicating if the day is a working dayCopyright © 2000–2024 Packwood Software. All rights reserved.