CalendarException

Inheritance: java.lang.Object

public final class CalendarException

Represent exceptional time periods in a calendar.

Constructors

ConstructorDescription
CalendarException()Initializes a new instance of the CalendarException class.

Methods

MethodDescription
checkException(Date dt)Returns true if the specified instance of the java.util.Date struct is the exception day.
delete()Deletes the Exception instance from parent calendar CalendarExceptionCollection object.
getDayWorking()Gets a value indicating whether the specified date or day type is working.
getDaysOfWeek()Gets the DayTypeCollection for this object.
getEnteredByOccurrences()Gets a value indicating whether the range of recurrence is defined by entering a number of occurrences.
getExceptionDates()Returns dates on which the calendar exception is applicable.
getFromDate()Gets the beginning of the exception time.
getMonth()Gets the month for which an exception recurrence is scheduled.
getMonthDay()Gets the day of a month on which an exception recurrence is scheduled.
getMonthItem()Gets the month item for which an exception recurrence is scheduled.
getMonthPosition()Gets the position of a month item within a month.
getName()Gets the name of the exception.
getOccurrences()Gets the number of occurrences for which the calendar exception is valid.
getParentCalendar()Gets the parent calendar for this object.
getPeriod()Gets the period of recurrence for the exception.
getToDate()Gets the end of the exception time.
getType()Gets the exception type.
getWorkingTime()Returns the working time for a calendar exception.
getWorkingTimes()Gets the WorkingTimeCollection object.
setDayWorking(boolean value)Sets a value indicating whether the specified date or day type is working.
setEnteredByOccurrences(boolean value)Sets a value indicating whether the range of recurrence is defined by entering a number of occurrences.
setFromDate(Date value)Sets the beginning of the exception time.
setMonth(int value)Sets the month for which an exception recurrence is scheduled.
setMonthDay(int value)Sets the day of a month on which an exception recurrence is scheduled.
setMonthItem(int value)Sets the month item for which an exception recurrence is scheduled.
setMonthPosition(int value)Sets the position of a month item within a month.
setName(String value)Sets the name of the exception.
setOccurrences(int value)Sets the number of occurrences for which the calendar exception is valid.
setPeriod(int value)Sets the period of recurrence for the exception.
setToDate(Date value)Sets the end of the exception time.
setType(int value)Sets the exception type.
setWorkingTimes(WorkingTimeCollection value)Sets the WorkingTimeCollection object.

CalendarException()

public CalendarException()

Initializes a new instance of the CalendarException class.

checkException(Date dt)

public final boolean checkException(Date dt)

Returns true if the specified instance of the java.util.Date struct is the exception day.

Parameters:

ParameterTypeDescription
dtjava.util.Datethe specified instance of the java.util.Date struct.

Returns: boolean - Returns true if java.util.Date value is the exception day; otherwise, false.

delete()

public final void delete()

Deletes the Exception instance from parent calendar CalendarExceptionCollection object.

getDayWorking()

public final boolean getDayWorking()

Gets a value indicating whether the specified date or day type is working.

Returns: boolean - a value indicating whether the specified date or day type is working.

getDaysOfWeek()

public final DayTypeCollection getDaysOfWeek()

Gets the DayTypeCollection for this object. The days of the week on which the exception is valid.

Returns: DayTypeCollection - the DayTypeCollection for this object.

getEnteredByOccurrences()

public final boolean getEnteredByOccurrences()

Gets a value indicating whether the range of recurrence is defined by entering a number of occurrences. False specifies that the range of recurrence is defined by entering a finish date.

Returns: boolean - a value indicating whether the range of recurrence is defined by entering a number of occurrences.

getExceptionDates()

public final Iterable<Date> getExceptionDates()

Returns dates on which the calendar exception is applicable.

Returns: java.lang.Iterable<java.util.Date> - dates on which the calendar exception is applicable.

getFromDate()

public final Date getFromDate()

Gets the beginning of the exception time.

Returns: java.util.Date - the beginning of the exception time.

getMonth()

public final int getMonth()

Gets the month for which an exception recurrence is scheduled.

Returns: int - the month for which an exception recurrence is scheduled.

getMonthDay()

public final int getMonthDay()

Gets the day of a month on which an exception recurrence is scheduled.

Returns: int - the day of a month on which an exception recurrence is scheduled.

getMonthItem()

public final int getMonthItem()

Gets the month item for which an exception recurrence is scheduled.

Returns: int - the month item for which an exception recurrence is scheduled.

getMonthPosition()

public final int getMonthPosition()

Gets the position of a month item within a month.

Returns: int - the position of a month item within a month.

getName()

public final String getName()

Gets the name of the exception.

Returns: java.lang.String - the name of the exception.

getOccurrences()

public final int getOccurrences()

Gets the number of occurrences for which the calendar exception is valid.

Returns: int - the number of occurrences for which the calendar exception is valid.

getParentCalendar()

public final Calendar getParentCalendar()

Gets the parent calendar for this object.

Returns: Calendar - the parent calendar for this object.

getPeriod()

public final int getPeriod()

Gets the period of recurrence for the exception.

Returns: int - the period of recurrence for the exception.

getToDate()

public final Date getToDate()

Gets the end of the exception time.

Returns: java.util.Date - the end of the exception time.

getType()

public final int getType()

Gets the exception type.

Returns: int - the exception type.

getWorkingTime()

public final double getWorkingTime()

Returns the working time for a calendar exception.

Returns: double - Returns working time for this calendar exception.

getWorkingTimes()

public final WorkingTimeCollection getWorkingTimes()

Gets the WorkingTimeCollection object. The collection of working times that defines the time worked on the weekday.


At least one working time must present, and there can’t be more than five.

Returns: WorkingTimeCollection - the WorkingTimeCollection object.

setDayWorking(boolean value)

public final void setDayWorking(boolean value)

Sets a value indicating whether the specified date or day type is working.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether the specified date or day type is working.

setEnteredByOccurrences(boolean value)

public final void setEnteredByOccurrences(boolean value)

Sets a value indicating whether the range of recurrence is defined by entering a number of occurrences. False specifies that the range of recurrence is defined by entering a finish date.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether the range of recurrence is defined by entering a number of occurrences.

setFromDate(Date value)

public final void setFromDate(Date value)

Sets the beginning of the exception time.

Parameters:

ParameterTypeDescription
valuejava.util.Datethe beginning of the exception time.

setMonth(int value)

public final void setMonth(int value)

Sets the month for which an exception recurrence is scheduled.

Parameters:

ParameterTypeDescription
valueintthe month for which an exception recurrence is scheduled.

setMonthDay(int value)

public final void setMonthDay(int value)

Sets the day of a month on which an exception recurrence is scheduled.

Parameters:

ParameterTypeDescription
valueintthe day of a month on which an exception recurrence is scheduled.

setMonthItem(int value)

public final void setMonthItem(int value)

Sets the month item for which an exception recurrence is scheduled.

Parameters:

ParameterTypeDescription
valueintthe month item for which an exception recurrence is scheduled.

setMonthPosition(int value)

public final void setMonthPosition(int value)

Sets the position of a month item within a month.

Parameters:

ParameterTypeDescription
valueintthe position of a month item within a month.

setName(String value)

public final void setName(String value)

Sets the name of the exception.

Parameters:

ParameterTypeDescription
valuejava.lang.Stringthe name of the exception.

setOccurrences(int value)

public final void setOccurrences(int value)

Sets the number of occurrences for which the calendar exception is valid.

Parameters:

ParameterTypeDescription
valueintthe number of occurrences for which the calendar exception is valid.

setPeriod(int value)

public final void setPeriod(int value)

Sets the period of recurrence for the exception.

Parameters:

ParameterTypeDescription
valueintthe period of recurrence for the exception.

setToDate(Date value)

public final void setToDate(Date value)

Sets the end of the exception time.

Parameters:

ParameterTypeDescription
valuejava.util.Datethe end of the exception time.

setType(int value)

public final void setType(int value)

Sets the exception type.

Parameters:

ParameterTypeDescription
valueintthe exception type.

setWorkingTimes(WorkingTimeCollection value)

public final void setWorkingTimes(WorkingTimeCollection value)

Sets the WorkingTimeCollection object. The collection of working times that defines the time worked on the weekday.


At least one working time must present, and there can’t be more than five.

Parameters:

ParameterTypeDescription
valueWorkingTimeCollectionthe WorkingTimeCollection object.