scheduler.db.instructordb
Class TimePreference

java.lang.Object
  extended by scheduler.db.instructordb.TimePreference

public class TimePreference
extends java.lang.Object

This method will house the time preference for an instructor for some time.

Author:
Cedric Wienold

Nested Class Summary
 class TimePreference.InvalidDayOfWeekException
          This exception class is thrown when the day of week is not in the Sunday to Saturday format.
 
Field Summary
private  int dayofweek
          The desired day of the week, where 0=Sunday and 6=Saturday
private  int desire
          The desire value
private  Time time
          The desired time
 
Constructor Summary
TimePreference(int dayofweek, Time time, int desire)
          This constructor will create a preference for a particular time.
 
Method Summary
 int getDayOfWeek()
          Returns the day of the week for this preference.
 int getDesire()
          This method returns the desire value of this preference.
 Time getTime()
          This method returns the time of this preference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dayofweek

private int dayofweek
The desired day of the week, where 0=Sunday and 6=Saturday


time

private Time time
The desired time


desire

private int desire
The desire value

Constructor Detail

TimePreference

public TimePreference(int dayofweek,
                      Time time,
                      int desire)
This constructor will create a preference for a particular time.

Parameters:
dayofweek - the day of the week, 0=Sunday, 6=Saturday
time - the desired time.
desire - the level of desire, between 0 and 10.
Method Detail

getDayOfWeek

public int getDayOfWeek()
Returns the day of the week for this preference.

Returns:
the day of the week for this preference.

getTime

public Time getTime()
This method returns the time of this preference.

Returns:

getDesire

public int getDesire()
This method returns the desire value of this preference.

Returns:
the desire value of this preference.