Class RollCalendarKeyword

java.lang.Object
com.uc4.api.objects.CalendarKeyword
com.uc4.api.objects.RollCalendarKeyword

public class RollCalendarKeyword extends CalendarKeyword
This class represents a Roll Calendar Keyword.
  • Constructor Details

    • RollCalendarKeyword

      protected RollCalendarKeyword(Element keyword, String string)
    • RollCalendarKeyword

      public RollCalendarKeyword(UC4ObjectName name, CalendarCondition cond)
      Constructs a new RollCalendarKeyword using the specified source calendar condition.
      Parameters:
      name - Name of the calendar keyword
      cond - Source calendar and keyword
  • Method Details

    • collisionIterator

      public Iterator<RollCalendarCollision> collisionIterator()
      Returns an iterator over RollCalendarCollision.
      Returns:
      Iterator over reactions in case of collisions
    • addCollision

      public void addCollision(RollCalendarCollision coll)
      Adds a RollCalendarCollision to the list of reactions in case of collision.
      Parameters:
      coll - Reactions in case of collision
    • removeCollision

      public boolean removeCollision(RollCalendarCollision coll)
      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

      public CalendarCondition 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

      public void setAdjustmentCalendar(CalendarCondition adjustmentCalendar)
      Sets the calendar and keyword from which days should be choosen if adjustment is enabled. The parameter adjustmentCalendar can be set to null if no specific calendar with valid days should be used.
      Parameters:
      adjustmentCalendar - Calendar name and calendar keyword containing valid days for adjustment
    • getSourceCalendar

      public CalendarCondition getSourceCalendar()
      Returns the source calendar condition.
      Returns:
      Source calendar condition
    • setSourceCalendar

      public void setSourceCalendar(CalendarCondition sourceCalendar)
      Sets the source calendar condition.
      Parameters:
      sourceCalendar - Source calendar condition
    • isStatic

      public boolean isStatic()
      Description copied from class: CalendarKeyword
      Returns true if this is a static keyword.
      Specified by:
      isStatic in class CalendarKeyword
      Returns:
      Boolean containing true in case of a static keyword
    • isWeekly

      public boolean isWeekly()
      Description copied from class: CalendarKeyword
      Returns true if this is a weekly keyword.
      Specified by:
      isWeekly in class CalendarKeyword
      Returns:
      Boolean containing true in case of a weekly keyword
    • isMonthly

      public boolean isMonthly()
      Description copied from class: CalendarKeyword
      Returns true if this is a monthly keyword.
      Specified by:
      isMonthly in class CalendarKeyword
      Returns:
      Boolean containing true in case of a monthly keyword
    • isYearly

      public boolean isYearly()
      Description copied from class: CalendarKeyword
      Returns true if this is a yearly keyword.
      Specified by:
      isYearly in class CalendarKeyword
      Returns:
      Boolean containing true in case of a yearly keyword
    • isGroup

      public boolean isGroup()
      Description copied from class: CalendarKeyword
      Returns true if this is a group keyword.
      Specified by:
      isGroup in class CalendarKeyword
      Returns:
      Boolean containing true in case of a group keyword
    • isRoll

      public boolean isRoll()
      Description copied from class: CalendarKeyword
      Returns true if this is a roll keyword.
      Specified by:
      isRoll in class CalendarKeyword
      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

      protected void save(com.uc4.util.XMLDocument doc, Element parent)
      Description copied from class: CalendarKeyword
      Saves the keyword under the specified parent element
      Specified by:
      save in class CalendarKeyword
      Parameters:
      doc - XML Document
      parent - Parent element