Class WeekRange

java.lang.Object
ch.poole.openinghoursparser.WeekRange
All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>

public class WeekRange extends Object
Container for objects from the opening_hours specification
  • Field Details

  • Constructor Details

    • WeekRange

      public WeekRange()
      Default constructor
    • WeekRange

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

    • toString

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

      public boolean equals(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 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