public class SequentialRecord extends DataRecord implements Sequential
| Constructor and Description |
|---|
SequentialRecord(java.lang.String name)
Instantiates a new sequential data record.
|
SequentialRecord(java.lang.String name,
java.util.Date start,
java.util.Date stop)
Instantiates a new sequential data record with a specified name and
start, stop times.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTimeSegment(java.util.Date start,
java.util.Date stop)
Add a time segment to this record, specifying start and stop times.
|
void |
addTimeSegment(java.util.Date start,
long duration)
Add a time segment to this record, specifying start time and duration
|
void |
addTimeSpan(TimeSpan span)
Add a time span to this record
|
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()
Get the earliest time that this record is active
|
java.util.Date |
getLatestTime()
Get the latest time that this record is active
|
java.util.SortedSet<TimeSpan> |
getTimeSpans()
Returns the sorted set of TimeSpan objects representing the sequence.
|
boolean |
isActive(java.util.Date testDate)
Determine whether the record is active at a particular time
|
boolean |
isActive(long millis)
Determine whether the record is active at a particular time
|
addEnumFieldValue, addIntFieldValue, addLocationFieldValue, addMeasureFieldValue, addTextFieldValue, addTimeFieldValue, getAllFieldNames, getEnumField, getEnumFieldNames, getEnumValues, getFieldAsString, getFieldType, getFloatField, getIntField, getIntFieldNames, getIntValues, getLink, getLocationField, getLocationFieldNames, getLocationValues, getMeasureField, getMeasureFieldNames, getMeasureValues, getName, getTextField, getTextFieldNames, getTextValues, getTimeField, getTimeFieldNames, getTimeValues, isMultiValued, mergeData, parseDataField, removeEnumFieldValue, removeField, removeIntFieldValue, removeLocationFieldValue, removeMeasureFieldValue, removeTextFieldValue, removeTimeFieldValue, setEnumField, setFloatField, setIntField, setLink, setLocationField, setMeasureField, setName, setTextField, setTimeField, toString, writeFieldsToMap, writeFieldsToStringpublic SequentialRecord(java.lang.String name)
name - the name of the recordpublic SequentialRecord(java.lang.String name,
java.util.Date start,
java.util.Date stop)
name - the name of the recordstart - the start time for the recordstop - the stop time for the recordpublic void addTimeSegment(java.util.Date start,
java.util.Date stop)
addTimeSegment in interface Sequentialstart - the start time of the new time segmentstop - the stop time of the new time segmentpublic void addTimeSegment(java.util.Date start,
long duration)
addTimeSegment in interface Sequentialstart - the start time of the new time segmentduration - the duration of the new time segment, in milliseondspublic void addTimeSpan(TimeSpan span)
addTimeSpan in interface Sequentialspan - the new time spanpublic java.util.Date getActiveStartTime(java.util.Date time)
getActiveStartTime in interface Sequentialtime - the time to use to find the time segmentpublic java.util.Date getActiveStopTime(java.util.Date time)
getActiveStopTime in interface Sequentialtime - the time to use to find the time segmentpublic java.util.Date getEarliestTime()
getEarliestTime in interface Sequentialpublic java.util.Date getLatestTime()
getLatestTime in interface Sequentialpublic java.util.SortedSet<TimeSpan> getTimeSpans()
getTimeSpans in interface Sequentialpublic boolean isActive(java.util.Date testDate)
isActive in interface SequentialtestDate - the date time to testpublic boolean isActive(long millis)
isActive in interface Sequentialmillis - the datetime in milliseconds to test