Class WeekDayRange

  • All Implemented Interfaces:
    Copy<ch.poole.openinghoursparser.Element>

    public class WeekDayRange
    extends java.lang.Object
    • Constructor Detail

      • WeekDayRange

        public WeekDayRange()
        Default constructor
      • WeekDayRange

        public WeekDayRange​(@NotNull
                            @NotNull WeekDayRange wdr)
        Construct a new WeekDayRange with the same contents
        Parameters:
        wdr - original WeekDayRange
    • Method Detail

      • toString

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

        public java.lang.String toDebugString()
        Create a string that identifies which class created it for debugging and testing
        Returns:
        the output of toString with the class name prepended
      • equals

        public boolean equals​(java.lang.Object other)
      • hashCode

        public int hashCode()
      • getStartDay

        public WeekDay getStartDay()
        Returns:
        the startDay
      • getEndDay

        public WeekDay getEndDay()
        Returns:
        the endDay
      • getNths

        public java.util.List<Nth> getNths()
        Returns:
        the nths
      • setStartDay

        public void setStartDay​(WeekDay day)
        Set the day the range starts on
        Parameters:
        day - the day to set
      • setStartDay

        public void setStartDay​(java.lang.String day)
        Set the day the range starts on
        Parameters:
        day - the day to set
      • setEndDay

        public void setEndDay​(WeekDay day)
        Set the day the range ends on
        Parameters:
        day - the day to set
      • setEndDay

        public void setEndDay​(java.lang.String day)
        Set the day the range ends on
        Parameters:
        day - the day to set
      • setNths

        public void setNths​(java.util.List<Nth> nths)
        Parameters:
        nths - the nths to set
      • add

        public void add​(Nth nth)
        Add a occurrence in the month for a week day
        Parameters:
        nth - the n'th occurrence
      • getOffset

        public int getOffset()
        Returns:
        the offset
      • setOffset

        public void setOffset​(int offset)
        Parameters:
        offset - the offset to set
      • copy

        public WeekDayRange copy()
        Description copied from interface: Copy
        Create a copy of the objecz
        Returns:
        a copy of the object