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 newRollCalendarKeywordusing the specified source calendar condition.protectedRollCalendarKeyword(Element keyword, String string) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aRollCalendarCollisionto the list of reactions in case of collision.intReturns the number of entries in the collision list.Returns an iterator overRollCalendarCollision.intReturns the number of days of adjustment.Returns the name and keyword of the calendar which contains valid days for adjustment.charReturns the source calendar condition.booleanisGroup()Returnstrueif this is a group keyword.booleanReturnstrueif this is a monthly keyword.booleanisRoll()Returnstrueif this is a roll keyword.booleanisStatic()Returnstrueif this is a static keyword.booleanisWeekly()Returnstrueif this is a weekly keyword.booleanisYearly()Returnstrueif this is a yearly keyword.booleanRemoves the specified reaction in case of a collision.protected voidSaves the keyword under the specified parent elementvoidsetAdjustDays(int adjustDays) Sets the number of days of adjustment.voidsetAdjustmentCalendar(CalendarCondition adjustmentCalendar) Sets the calendar and keyword from which days should be choosen if adjustment is enabled.voidsetAdjustSign(char sign) Sets the sign of the adjust offset.voidsetSourceCalendar(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 newRollCalendarKeywordusing 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 aRollCalendarCollisionto 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 parameteradjustmentCalendarcan be set tonullif 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:CalendarKeywordReturnstrueif this is a static keyword.- Specified by:
isStaticin classCalendarKeyword- Returns:
- Boolean containing true in case of a static keyword
-
isWeekly
public boolean isWeekly()Description copied from class:CalendarKeywordReturnstrueif this is a weekly keyword.- Specified by:
isWeeklyin classCalendarKeyword- Returns:
- Boolean containing true in case of a weekly keyword
-
isMonthly
public boolean isMonthly()Description copied from class:CalendarKeywordReturnstrueif this is a monthly keyword.- Specified by:
isMonthlyin classCalendarKeyword- Returns:
- Boolean containing true in case of a monthly keyword
-
isYearly
public boolean isYearly()Description copied from class:CalendarKeywordReturnstrueif this is a yearly keyword.- Specified by:
isYearlyin classCalendarKeyword- Returns:
- Boolean containing true in case of a yearly keyword
-
isGroup
public boolean isGroup()Description copied from class:CalendarKeywordReturnstrueif this is a group keyword.- Specified by:
isGroupin classCalendarKeyword- Returns:
- Boolean containing true in case of a group keyword
-
isRoll
public boolean isRoll()Description copied from class:CalendarKeywordReturnstrueif this is a roll keyword.- Specified by:
isRollin 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:CalendarKeywordSaves the keyword under the specified parent element- Specified by:
savein classCalendarKeyword- Parameters:
doc- XML Documentparent- Parent element
-