Package com.uc4.api.objects
Class RollCalendarKeyword
java.lang.Object
com.uc4.api.objects.CalendarKeyword
com.uc4.api.objects.RollCalendarKeyword
This class represents a Roll Calendar Keyword.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRollCalendarKeyword
(UC4ObjectName name, CalendarCondition cond) Constructs a newRollCalendarKeyword
using the specified source calendar condition.protected
RollCalendarKeyword
(Element keyword, String string) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aRollCalendarCollision
to the list of reactions in case of collision.int
Returns the number of entries in the collision list.Returns an iterator overRollCalendarCollision
.int
Returns the number of days of adjustment.Returns the name and keyword of the calendar which contains valid days for adjustment.char
Returns the source calendar condition.boolean
isGroup()
Returnstrue
if this is a group keyword.boolean
Returnstrue
if this is a monthly keyword.boolean
isRoll()
Returnstrue
if this is a roll keyword.boolean
isStatic()
Returnstrue
if this is a static keyword.boolean
isWeekly()
Returnstrue
if this is a weekly keyword.boolean
isYearly()
Returnstrue
if this is a yearly keyword.boolean
Removes the specified reaction in case of a collision.protected void
Saves the keyword under the specified parent elementvoid
setAdjustDays
(int adjustDays) Sets the number of days of adjustment.void
setAdjustmentCalendar
(CalendarCondition adjustmentCalendar) Sets the calendar and keyword from which days should be choosen if adjustment is enabled.void
setAdjustSign
(char sign) Sets the sign of the adjust offset.void
setSourceCalendar
(CalendarCondition sourceCalendar) Sets the source calendar condition.Methods inherited from class com.uc4.api.objects.CalendarKeyword
containsDate, equals, getCalendarName, getErrorMessageInsert, getErrorMessageNumber, getErrorText, getName, getPreCalculatedDates, hashCode, invalidateCalculatedDates, loadCalculatedDays, setCalendarName, setErrorMessageInsert, setErrorMessageNumber, setErrorText, setName, toString
-
Constructor Details
-
RollCalendarKeyword
-
RollCalendarKeyword
Constructs a newRollCalendarKeyword
using the specified source calendar condition.- Parameters:
name
- Name of the calendar keywordcond
- Source calendar and keyword
-
-
Method Details
-
collisionIterator
Returns an iterator overRollCalendarCollision
.- Returns:
- Iterator over reactions in case of collisions
-
addCollision
Adds aRollCalendarCollision
to the list of reactions in case of collision.- Parameters:
coll
- Reactions in case of collision
-
removeCollision
Removes the specified reaction in case of a collision.- Parameters:
coll
- Reactions in case of collision- Returns:
- True if and only if the RollCalendarCollision was removed from this list of collisions
-
collionsSize
public int collionsSize()Returns the number of entries in the collision list.- Returns:
- Number of collitions actions
-
getAdjustDays
public int getAdjustDays()Returns the number of days of adjustment.- Returns:
- Integer containing the day offset
-
setAdjustDays
public void setAdjustDays(int adjustDays) Sets the number of days of adjustment.- Parameters:
adjustDays
- Integer containing the day offset
-
getAdjustmentCalendar
Returns the name and keyword of the calendar which contains valid days for adjustment.- Returns:
- Calendar name and calendar keyword containing valid days for adjustment
-
setAdjustmentCalendar
Sets the calendar and keyword from which days should be choosen if adjustment is enabled. The parameteradjustmentCalendar
can be set tonull
if no specific calendar with valid days should be used.- Parameters:
adjustmentCalendar
- Calendar name and calendar keyword containing valid days for adjustment
-
getSourceCalendar
Returns the source calendar condition.- Returns:
- Source calendar condition
-
setSourceCalendar
Sets the source calendar condition.- Parameters:
sourceCalendar
- Source calendar condition
-
isStatic
public boolean isStatic()Description copied from class:CalendarKeyword
Returnstrue
if this is a static keyword.- Specified by:
isStatic
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a static keyword
-
isWeekly
public boolean isWeekly()Description copied from class:CalendarKeyword
Returnstrue
if this is a weekly keyword.- Specified by:
isWeekly
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a weekly keyword
-
isMonthly
public boolean isMonthly()Description copied from class:CalendarKeyword
Returnstrue
if this is a monthly keyword.- Specified by:
isMonthly
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a monthly keyword
-
isYearly
public boolean isYearly()Description copied from class:CalendarKeyword
Returnstrue
if this is a yearly keyword.- Specified by:
isYearly
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a yearly keyword
-
isGroup
public boolean isGroup()Description copied from class:CalendarKeyword
Returnstrue
if this is a group keyword.- Specified by:
isGroup
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a group keyword
-
isRoll
public boolean isRoll()Description copied from class:CalendarKeyword
Returnstrue
if this is a roll keyword.- Specified by:
isRoll
in classCalendarKeyword
- Returns:
- Boolean containing true in case of a roll keyword
-
setAdjustSign
public void setAdjustSign(char sign) Sets the sign of the adjust offset.- Parameters:
sign
- Sign '+' or '-'
-
getAdjustSign
public char getAdjustSign()- Returns:
- Sign of the adjust offset. Can be + or -
-
save
Description copied from class:CalendarKeyword
Saves the keyword under the specified parent element- Specified by:
save
in classCalendarKeyword
- Parameters:
doc
- XML Documentparent
- Parent element
-