|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DayTimeRanges
Represents a range or ranges of time(s) in a day
Field Summary | |
private boolean[] |
dayTimeRanges
Contains time range information (Consult data dictionary for more information on how our time ranges are being represented) |
Constructor Summary | |
DayTimeRanges()
Constructs a day with no time ranges designated |
|
DayTimeRanges(Times startTime,
Times stopTime)
Constructs a day with one time range designated |
Method Summary | |
void |
Clear()
Clears the entire time range |
java.lang.Object |
clone()
Makes a copy of the current object |
boolean[] |
Compare(boolean[] toCompare)
Compares two times to see where they overlap |
boolean[] |
Get()
Gets the day's time ranges as a boolean array |
java.util.Vector |
GetStartStopTimes()
Gets the day's time ranges as a vector of start and stop Times This function goes through the private boolean array. |
void |
Insert(Times startTime,
Times endTime)
Inserts a time range or ranges into the current object |
void |
Remove(Times startTime,
Times endTime)
Removes a time range or ranges from the current object |
Methods inherited from class java.lang.Object |
|
Field Detail |
private boolean[] dayTimeRanges
Constructor Detail |
public DayTimeRanges()
Preconditions: (none)
Postconditions: A new time range with no "highlighted" times will be constructed
public DayTimeRanges(Times startTime, Times stopTime)
Preconditions:
start and stop are within the valid range
(0.0-23.5 to nearest .5)
start < stop
Postconditions:
A new time range will be constructed with
given initial time range information
start
- start timestop
- end timeMethod Detail |
public void Insert(Times startTime, Times endTime)
Preconditions:
none
Postconditions:
All time ranges that are on within "in" will be set on
for the current time range
in
- boolean array of size 48 to be insertedpublic void Remove(Times startTime, Times endTime)
Preconditions:
none
Postconditions:
All time ranges that are on within "clear" will be
set off within the current time range
clear
- boolean array of size 48 to be removedpublic void Clear()
Preconditions:
(none)
Postconditions:
The entire time range will be cleared
public boolean[] Compare(boolean[] toCompare)
Preconditions:
toCompare is an array of size 48
Postconditions:
The method will return a time range that represents
the overlapping of the current time range and the
given time range toCompare
toCompare
- time ranges to compare, must be a boolean array
of size 48public boolean[] Get()
Preconditions:
(none)
Postconditions:
The current time range will be returned as a boolean
array (for information on this representation,
consult the data dictionary)
public java.util.Vector GetStartStopTimes()
Preconditions:
(none)
Postconditions:
The current time range will be returned as a vector of time ranges
of start and stop Times
public java.lang.Object clone()
Preconditions:
(none)
Postconditions:
The method will make a copy of the current object and return
that copy
clone
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |