public interface Sequential
Modifier and Type | Method and Description |
---|---|
void |
addTimeSegment(java.util.Date start,
java.util.Date stop)
Adds a time segment - a start/stop time - to the sequence's list of
start/stop times.
|
void |
addTimeSegment(java.util.Date start,
long duration)
Adds a time segment - a start/stop time - to the sequence's list of
start/stop times.
|
void |
addTimeSpan(TimeSpan span)
Adds a TimeSpan to the sequence's list of TimeSpans.
|
java.util.Date |
getActiveStartTime(java.util.Date time)
Gets the start time of the time segment that includes time
|
java.util.Date |
getActiveStopTime(java.util.Date time)
Gets the stop time of the time segment that includes time
|
java.util.Date |
getEarliestTime()
Returns the earliest time that this sequence is active.
|
java.util.Date |
getLatestTime()
Returns the latest time that this sequence is active.
|
java.util.SortedSet<TimeSpan> |
getTimeSpans()
Returns the sorted set of TimeSpan objects representing the sequence.
|
boolean |
isActive(java.util.Date testDate)
Returns whether the sequence of time spans is active at the test date.
|
boolean |
isActive(long millis)
Returns whether the sequence is active at the specified time.
|
void addTimeSegment(java.util.Date start, java.util.Date stop)
start
- the new start timestop
- the new stop timevoid addTimeSegment(java.util.Date start, long duration)
start
- the new start timeduration
- the duration of the time segmentvoid addTimeSpan(TimeSpan span)
span
- the new time spanjava.util.Date getActiveStartTime(java.util.Date time)
time
- the time to use to find the time segmentjava.util.Date getActiveStopTime(java.util.Date time)
time
- the time to use to find the time segmentjava.util.Date getEarliestTime()
java.util.Date getLatestTime()
java.util.SortedSet<TimeSpan> getTimeSpans()
boolean isActive(java.util.Date testDate)
testDate
- the date to test to see if the sequence is active.boolean isActive(long millis)
millis
- the time, in milliseconds after Jan 1, 1970, to test to
see if the sequence is active.