|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.example.model.Sched
public class Sched
Schedule class including the functions to parse, combine, invert, and change to a string.
Field Summary | |
---|---|
java.lang.String[] |
availableString
|
Constructor Summary | |
---|---|
Sched()
Constructor, initializes some variables |
Method Summary | |
---|---|
void |
combineScheds()
Combines independent schedules (including the "restriction" schedule) into one "super-schedule" with all of the times factored in and no over-lapping time slots |
void |
convertToString()
Converts the "super-schedule" object to a single String (availableString) in standard-time human-readable format |
void |
displaySchedules(int flag)
Prints out all inputted schedules for debugging purposes flag = 0 for String output, flag = 1 for Vector output flag = 2 for superSched output, flag = 3 for inverted schedule output, flag = 4 for final string output |
java.lang.String[] |
getFreeTimes()
Compares and combines the different schedules and returns the result, taking time restrictions into consideration |
void |
invertSched()
Invert the "super-schedule" to produce a schedule listing all of the available free times |
void |
parseScheds()
Parses a schedule into a form that can be used for easy comparisons (integers in military times within schedule objects) and also ensures that the format entered is valid |
void |
putRestrictions(java.lang.String r)
Factors in overall scheduling restrictions |
void |
putSched(int user,
int day,
java.lang.String sched)
Puts each schedule into the scheds array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String[] availableString
Constructor Detail |
---|
public Sched()
Method Detail |
---|
public void putSched(int user, int day, java.lang.String sched)
user
- is an int to tell which user is being added today
- is an int to tell which day is being added tosched
- is an unformatted String with times that are unavailablepublic void putRestrictions(java.lang.String r)
r
- is an unformatted String with the range the output shoudl be inpublic void displaySchedules(int flag)
flag
- is an int which tells what Schedule to outputpublic java.lang.String[] getFreeTimes()
public void parseScheds()
public void combineScheds()
public void invertSched()
public void convertToString()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |