Package ch.poole.openinghoursparser
Class WeekRange
java.lang.Object
ch.poole.openinghoursparser.WeekRange
- All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>
Container for objects from the opening_hours specification
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intValid week number are from 1 to 53 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a copy of the objeczbooleanintintintinthashCode()voidsetEndWeek(int end) voidsetInterval(int interval) voidsetStartWeek(int start) Create a string that identifies which class created it for debugging and testingtoString()
-
Field Details
-
UNDEFINED_WEEK
public static final int UNDEFINED_WEEKValid week number are from 1 to 53- See Also:
-
MIN_WEEK
public static final int MIN_WEEK- See Also:
-
MAX_WEEK
public static final int MAX_WEEK- See Also:
-
-
Constructor Details
-
WeekRange
public WeekRange()Default constructor -
WeekRange
Construct a new WeekRange with the same contents- Parameters:
wr- the original WeekRange
-
-
Method Details
-
toString
-
equals
-
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
Description copied from interface:CopyCreate a copy of the objecz- Returns:
- a copy of the object
-
toDebugString
Create a string that identifies which class created it for debugging and testing- Returns:
- the output of toString with the class name prepended
-