Class WeekDayRange

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

public class WeekDayRange extends Object
  • Constructor Details

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

    • toString

      public String toString()
      Overrides:
      toString in class 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
    • equals

      public boolean equals(Object other)
    • hashCode

      public int hashCode()
    • getStartDay

      public WeekDay getStartDay()
      Returns:
      the startDay
    • getEndDay

      public WeekDay getEndDay()
      Returns:
      the endDay
    • getNths

      public 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(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(String day)
      Set the day the range ends on
      Parameters:
      day - the day to set
    • setNths

      public void setNths(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