public class TeachingAssignment extends Value<TeachingRequest.Variable,TeachingAssignment>
Constructor and Description |
---|
TeachingAssignment(TeachingRequest.Variable variable,
Instructor instructor)
Constructor
|
TeachingAssignment(TeachingRequest.Variable variable,
Instructor instructor,
int attributePreference)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
By default, comparison is made on unique ids
|
int |
getAttributePreference()
Attribute preference
|
int |
getCoursePreference()
Course preference
|
Instructor |
getInstructor()
Assigned instructor
|
int |
getInstructorPreference()
Instructor preference
|
String |
getName()
Values name -- for printing purposes (E.g., Monday 7:30)
|
int |
getTimePreference()
Time preference
|
int |
hashCode() |
double |
toDouble(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)
Double representation.
|
String |
toString() |
compareTo, compareTo, conflicts, conflicts, getDescription, getExtra, getId, isConsistent, setExtra, setVariable, toDouble, valueEquals, valueEquals, variable
public TeachingAssignment(TeachingRequest.Variable variable, Instructor instructor, int attributePreference)
variable
- teaching request variableinstructor
- instructor (it is expected that Instructor.canTeach(TeachingRequest)
is true and that TeachingRequest.getAttributePreference(Instructor)
is not prohibited)attributePreference
- attribute preference (value of TeachingRequest.getAttributePreference(Instructor)
)public TeachingAssignment(TeachingRequest.Variable variable, Instructor instructor)
variable
- teaching request variableinstructor
- instructor (it is expected that Instructor.canTeach(TeachingRequest)
is true and that TeachingRequest.getAttributePreference(Instructor)
is not prohibited)public Instructor getInstructor()
public double toDouble(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)
Value
toDouble
in class Value<TeachingRequest.Variable,TeachingAssignment>
assignment
- current assignmentpublic boolean equals(Object o)
Value
equals
in class Value<TeachingRequest.Variable,TeachingAssignment>
public int getAttributePreference()
public int getTimePreference()
public int getInstructorPreference()
public int getCoursePreference()
public int hashCode()
hashCode
in class Value<TeachingRequest.Variable,TeachingAssignment>
public String toString()
toString
in class Value<TeachingRequest.Variable,TeachingAssignment>
public String getName()
Value
getName
in class Value<TeachingRequest.Variable,TeachingAssignment>