Package ch.poole.openinghoursparser
Class TimeSpan
java.lang.Object
ch.poole.openinghoursparser.TimeSpan
- 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 intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a copy of the objeczbooleanintgetEnd()intintgetStart()inthashCode()booleanvoidsetEnd(int e) Set the end of range valuevoidsetEndEvent(VariableTime endEvent) voidsetInterval(int interval) voidsetOpenEnded(boolean openEnded) voidsetStart(int s) Set the start of range valuevoidsetStartEvent(VariableTime startEvent) Create a string that identifies which class created it for debugging and testingtoString()
-
Field Details
-
UNDEFINED_TIME
public static final int UNDEFINED_TIME- See Also:
-
MIN_TIME
public static final int MIN_TIME- See Also:
-
MAX_TIME
public static final int MAX_TIME- See Also:
-
MAX_EXTENDED_TIME
public static final int MAX_EXTENDED_TIME- See Also:
-
-
Constructor Details
-
TimeSpan
public TimeSpan()Default constructor -
TimeSpan
Construct a new TimeSpan with the same contents- Parameters:
ts- the original TimeSpan
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getStart
public int getStart()- Returns:
- the start time in minutes
-
getStartEvent
- Returns:
- the startEvent
-
getEnd
public int getEnd()- Returns:
- the end time in minutes
-
getEndEvent
- Returns:
- the endEvent
-
isOpenEnded
public boolean isOpenEnded()- Returns:
- the openEnded
-
getInterval
public int getInterval()- Returns:
- the interval
-
setStart
public void setStart(int s) Set the start of range value- Parameters:
s- the start value to set
-
setStartEvent
- Parameters:
startEvent- the startEvent to set
-
setEnd
public void setEnd(int e) Set the end of range value- Parameters:
e- the end value to set
-
setEndEvent
- Parameters:
endEvent- the endEvent to set
-
setOpenEnded
public void setOpenEnded(boolean openEnded) - Parameters:
openEnded- the openEnded 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
-