Class PeriodGroup
java.lang.Object
COM.TIBCO.hawk.config.rbengine.schedule.PeriodGroup
- All Implemented Interfaces:
Scheduleable,Cloneable
A PeriodGroup is a logical group of Periods useful for defining an asbtract group of
Periods. For example, a PeriodGroup named Holiday may contain periods that include
all the holidays within a year.
To use a PeriodGroup in the inclusion or exclusion periods of a Schedule,
the PeriodGroup is referenced by a
PeriodGroupReference
added to inclusion or exclusion periods of a schedule.
A PeriodGroup is in-schedule only if all of its periods are in-schedule. Otherwise, a PeriodGroup is out-of-schedule.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPeriodGroup(String name) Creates an empty PeriodGroup with the specified name.PeriodGroup(String name, Period[] periods) Creates a PeriodGroup with specified name and periods. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a copy of this PeriodGroup.booleanCompares the specified object with this PeriodGroup.getName()Returns the name of this PeriodGroup.Period[]Returns the periods in this PeriodGroup.booleanChecks to see if this PeriodGroup is in schedule based on the specified GregorianCalendar.voidSets the name this PeriodGroup.voidsetPeriods(Period[] periods) Replaces the periods in this PeriodGroup with the specified periods.toString(int iType) Returns a string reprensentation of this PeriodGroup.
-
Constructor Details
-
PeriodGroup
Creates an empty PeriodGroup with the specified name. -
PeriodGroup
Creates a PeriodGroup with specified name and periods.- Throws:
ScheduleException- if invalid periods are specified.
-
-
Method Details
-
setName
Sets the name this PeriodGroup. -
getName
Returns the name of this PeriodGroup. -
setPeriods
Replaces the periods in this PeriodGroup with the specified periods.- Parameters:
periods- an array of Periods .- Throws:
ScheduleException- if invalid periods are specified.
-
getPeriods
Returns the periods in this PeriodGroup.- Returns:
- the periods in this PeriodGroup.
-
equals
Compares the specified object with this PeriodGroup. -
clone
Returns a copy of this PeriodGroup.- Overrides:
clonein classObject- Returns:
- a copy of this PeriodGroup.
- Throws:
CloneNotSupportedException
-
toString
Returns a string reprensentation of this PeriodGroup. -
inSchedule
Checks to see if this PeriodGroup is in schedule based on the specified GregorianCalendar.- Specified by:
inSchedulein interfaceScheduleable- Parameters:
gc- GregorianCalendar for checking if this PeriodGroup is in schedule.- Returns:
- true Period is in schedule.
-