Class RollCalendarCollision


  • public class RollCalendarCollision
    extends java.lang.Object
    This class represents a reaction to a collision for roll calendar keywords.
    • Constructor Detail

      • RollCalendarCollision

        @Deprecated
        public RollCalendarCollision​(CalendarCondition collisionCalendar,
                                     int offset)
        Deprecated.
        Use RollCalendarCollision(CalendarCondition collisionCalendar, int adjustDays, char sign, CalendarCondition inCalendar) instead
        Constructs a new RollCalendarCollision. Offset can be set to 0 if skip should be used as action.
        Parameters:
        collisionCalendar - Calendar object and keyword with which collisions may occur
        offset - Positive or negative integer containg the number of days
      • RollCalendarCollision

        @Deprecated
        public RollCalendarCollision​(CalendarCondition collisionCalendar,
                                     int offset,
                                     CalendarCondition inCalendar)
        Deprecated.
        Use RollCalendarCollision(CalendarCondition collisionCalendar, int adjustDays, char sign, CalendarCondition inCalendar) instead
        Constructs a new RollCalendarCollision. Offset can be set to 0 if skip should be used as action.
        Parameters:
        collisionCalendar - Calendar object and keyword with which collisions may occur
        offset - Positive or negative integer containg the number of days
        inCalendar - Specify a particular Calendar keyword whose area may be used, can be null
      • RollCalendarCollision

        public RollCalendarCollision​(CalendarCondition collisionCalendar,
                                     int adjustDays,
                                     char sign,
                                     CalendarCondition inCalendar)
        Constructs a new RollCalendarCollision. Offset can be set to 0 if skip should be used as action.
        Parameters:
        collisionCalendar - Calendar object and keyword with which collisions may occur
        adjustDays - Positive integer containg the number of days
        sign - Action (+,- or S for Skip)
        inCalendar - Specify a particular Calendar keyword whose area may be used, can be null
      • RollCalendarCollision

        protected RollCalendarCollision​(org.w3c.dom.Element row)
    • Method Detail

      • 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
      • setAdjustSign

        public void setAdjustSign​(char sign)
        Sets the sign of the adjust offset.
        Parameters:
        sign - Sign '+', '-' or 'S' (skip)
      • getAdjustSign

        public char getAdjustSign()
        Returns:
        Sign of the adjust offset. Can be '+', '-' or 'S' for Skip
      • getCollisionCalendar

        public CalendarCondition getCollisionCalendar()
        Returns the calendar object and keyword with which collisions may occur.
        Returns:
        Calendar object and keyword with which collisions may occur
      • setCollisionCalendar

        public void setCollisionCalendar​(CalendarCondition collisionCalendar)
        Sets the calendar object and keyword with which collisions may occur.
        Parameters:
        collisionCalendar - Calendar object and keyword with which collisions may occur
      • getInCalendar

        public CalendarCondition getInCalendar()
        Returns the calendar keyword whose area may be used when moving days.
        Returns:
        Calendar keyword whose area may be used when moving days
      • setInCalendar

        public void setInCalendar​(CalendarCondition inCalendar)
        Sets the calendar keyword whose area may be used when moving days. The parameter inCalendar can be set to null if no area should be considered when moving days.
        Parameters:
        inCalendar - Calendar keyword whose area may be used when moving days
      • getOffset

        @Deprecated
        public int getOffset()
        Deprecated.
        use getAdjustSign() and getAdjustSign() instead
        Returns the offset in days.
        Returns:
        Offset in days
      • setOffset

        @Deprecated
        public void setOffset​(int offset)
        Deprecated.
        use setAdjustSign() and setAdjustSign() instead
        Sets the offset in days.
        Parameters:
        offset - Offset in days
      • store

        protected void store​(org.w3c.dom.Element row)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object