Class WeekRange

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

    public class WeekRange
    extends java.lang.Object
    Container for objects from the opening_hours specification
    • Constructor Detail

      • WeekRange

        public WeekRange()
        Default constructor
      • WeekRange

        public WeekRange​(WeekRange wr)
        Construct a new WeekRange with the same contents
        Parameters:
        wr - the original WeekRange
    • Method Detail

      • toString

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

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

        public int hashCode()
      • getStartWeek

        public int getStartWeek()
        Returns:
        the startWeek
      • getEndWeek

        public int getEndWeek()
        Returns:
        the endWeek
      • getInterval

        public int getInterval()
        Returns:
        the interval
      • setStartWeek

        public void setStartWeek​(int start)
        Parameters:
        start - the startWeek to set
      • setEndWeek

        public void setEndWeek​(int end)
        Parameters:
        end - the endWeek to set
      • setInterval

        public void setInterval​(int interval)
        Parameters:
        interval - the interval to set
      • copy

        public WeekRange copy()
        Description copied from interface: Copy
        Create a copy of the objecz
        Returns:
        a copy of the 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