Package ch.poole.openinghoursparser
Class WeekDayRange
- java.lang.Object
-
- ch.poole.openinghoursparser.WeekDayRange
-
- All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>
public class WeekDayRange extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WeekDayRange()Default constructorWeekDayRange(@NotNull WeekDayRange wdr)Construct a new WeekDayRange with the same contents
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Nth nth)Add a occurrence in the month for a week dayWeekDayRangecopy()Create a copy of the objeczbooleanequals(java.lang.Object other)WeekDaygetEndDay()java.util.List<Nth>getNths()intgetOffset()WeekDaygetStartDay()inthashCode()voidsetEndDay(WeekDay day)Set the day the range ends onvoidsetEndDay(java.lang.String day)Set the day the range ends onvoidsetNths(java.util.List<Nth> nths)voidsetOffset(int offset)voidsetStartDay(WeekDay day)Set the day the range starts onvoidsetStartDay(java.lang.String day)Set the day the range starts onjava.lang.StringtoDebugString()Create a string that identifies which class created it for debugging and testingjava.lang.StringtoString()
-
-
-
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:
toStringin classjava.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:CopyCreate a copy of the objecz- Returns:
- a copy of the object
-
-