Package ch.poole.openinghoursparser
Class WeekRange
- java.lang.Object
-
- ch.poole.openinghoursparser.WeekRange
-
- All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>
public class WeekRange extends java.lang.ObjectContainer for objects from the opening_hours specification
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_WEEKstatic intMIN_WEEKstatic intUNDEFINED_WEEKValid week number are from 1 to 53
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeekRangecopy()Create a copy of the objeczbooleanequals(java.lang.Object other)intgetEndWeek()intgetInterval()intgetStartWeek()inthashCode()voidsetEndWeek(int end)voidsetInterval(int interval)voidsetStartWeek(int start)java.lang.StringtoDebugString()Create a string that identifies which class created it for debugging and testingjava.lang.StringtoString()
-
-
-
Field Detail
-
UNDEFINED_WEEK
public static final int UNDEFINED_WEEK
Valid week number are from 1 to 53- See Also:
- Constant Field Values
-
MIN_WEEK
public static final int MIN_WEEK
- See Also:
- Constant Field Values
-
MAX_WEEK
public static final int MAX_WEEK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WeekRange
public WeekRange()
Default constructor
-
WeekRange
public WeekRange(WeekRange wr)
Construct a new WeekRange with the same contents- Parameters:
wr- the original WeekRange
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.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:CopyCreate a copy of the objecz- Returns:
- a copy of the 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
-
-