|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscheduler.generate.FindLocation
public class FindLocation
This class contains methods for selecting the most ideal location for a particular instructor to teach. This method was not included in Generate.java b/c there were multiple persons working on various aspects of the class. So, to enable each person to do his/her work w/o fear of conflicts, each important schedule of scheduling functionality was broken into its own, individual class.
| Constructor Summary | |
|---|---|
FindLocation()
|
|
| Method Summary | |
|---|---|
protected static void |
checkPreconditions(Course course,
java.util.LinkedHashMap<Time,Time> timeList,
java.util.Collection<Location> locations)
checks post conditions of the findLocation method |
protected static DaysInWeek |
convert(java.util.Collection<java.lang.Integer> dayList)
Converts an array of integers to a DaysInWeek object. |
static int |
daysTaught(Course course)
Determines the number of days a course should be taught |
static java.util.LinkedList<LocationAndTime> |
findLocation(Instructor instructor,
Course course,
java.util.LinkedHashMap<Time,Time> timeList,
java.util.Collection<Location> locations)
The method takes in a list of preferred times and assigns the highest preferred time possible, give location availability and course requirements |
protected static boolean |
hasCourseReqs(Course course,
Location location)
checks if a given location will be suitable for a given course. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FindLocation()
| Method Detail |
|---|
public static java.util.LinkedList<LocationAndTime> findLocation(Instructor instructor,
Course course,
java.util.LinkedHashMap<Time,Time> timeList,
java.util.Collection<Location> locations)
instructor - instructor to be scheduledcourse - course to be scheduledtimeList - linked hash map of start and end times, ordered from most preferable to leastlocations - list of locations
protected static DaysInWeek convert(java.util.Collection<java.lang.Integer> dayList)
dayList - Int list to convert
protected static boolean hasCourseReqs(Course course,
Location location)
course - course to be checkedlocation - location to be checked
public static int daysTaught(Course course)
course -
protected static void checkPreconditions(Course course,
java.util.LinkedHashMap<Time,Time> timeList,
java.util.Collection<Location> locations)
throws java.lang.NullPointerException
course - timeList - locations -
java.lang.NullPointerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||