Package ch.poole.openinghoursparser
Class WeekDayRange
java.lang.Object
ch.poole.openinghoursparser.WeekDayRange
- All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorWeekDayRange(@NotNull WeekDayRange wdr) Construct a new WeekDayRange with the same contents -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a occurrence in the month for a week daycopy()Create a copy of the objeczbooleangetNths()intinthashCode()voidSet the day the range ends onvoidSet the day the range ends onvoidvoidsetOffset(int offset) voidsetStartDay(WeekDay day) Set the day the range starts onvoidsetStartDay(String day) Set the day the range starts onCreate a string that identifies which class created it for debugging and testingtoString()
-
Constructor Details
-
WeekDayRange
public WeekDayRange()Default constructor -
WeekDayRange
Construct a new WeekDayRange with the same contents- Parameters:
wdr- original WeekDayRange
-
-
Method Details
-
toString
-
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
-
hashCode
public int hashCode() -
getStartDay
- Returns:
- the startDay
-
getEndDay
- Returns:
- the endDay
-
getNths
- Returns:
- the nths
-
setStartDay
Set the day the range starts on- Parameters:
day- the day to set
-
setStartDay
Set the day the range starts on- Parameters:
day- the day to set
-
setEndDay
Set the day the range ends on- Parameters:
day- the day to set
-
setEndDay
Set the day the range ends on- Parameters:
day- the day to set
-
setNths
- Parameters:
nths- the nths to set
-
add
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
Description copied from interface:CopyCreate a copy of the objecz- Returns:
- a copy of the object
-