public class Unavailability extends Object implements SctAssignment
Constructor and Description |
---|
Unavailability(Student student,
Section section,
boolean canOverlap)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
assigned(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Enrollment with this assignment was assigned to a
Request . |
int |
compareById(SctAssignment a)
Compare assignments by unique ids.
|
Enrollment |
createEnrollment()
Create dummy enrollment of this unavailability
|
boolean |
equals(Object o) |
Set<Enrollment> |
getEnrollments(Assignment<Request,Enrollment> assignment)
Not used, always null
|
long |
getId()
Unique id
|
int |
getNrRooms()
Number of rooms in which a section meets
|
List<RoomLocation> |
getRooms()
Room assignment
|
Section |
getSection()
Section
|
Student |
getStudent()
Student
|
TimeLocation |
getTime()
Time assignment
|
int |
hashCode() |
boolean |
isAllowOverlap()
Can student have classes during this unavailability?
|
boolean |
isOverlapping(SctAssignment assignment)
True, if this assignment is overlapping in time and space with the given
assignment.
|
boolean |
isOverlapping(Set<? extends SctAssignment> assignments)
True, if this assignment is overlapping in time and space with the given
set of assignments.
|
void |
unassigned(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Enrollment with this assignment was unassigned from a
Request . |
public Unavailability(Student student, Section section, boolean canOverlap)
student
- studentsection
- section that the student is teachingcanOverlap
- true if student can have classes during the time, but the overlapping time should be minimizedpublic Student getStudent()
public Section getSection()
public long getId()
SctAssignment
getId
in interface SctAssignment
public TimeLocation getTime()
SctAssignment
getTime
in interface SctAssignment
public boolean isAllowOverlap()
isAllowOverlap
in interface SctAssignment
public List<RoomLocation> getRooms()
SctAssignment
getRooms
in interface SctAssignment
RoomLocation
public int getNrRooms()
SctAssignment
getNrRooms
in interface SctAssignment
public boolean isOverlapping(SctAssignment assignment)
SctAssignment
isOverlapping
in interface SctAssignment
assignment
- another assignmentpublic boolean isOverlapping(Set<? extends SctAssignment> assignments)
SctAssignment
isOverlapping
in interface SctAssignment
assignments
- a set of assignmentspublic void assigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
SctAssignment
Request
.assigned
in interface SctAssignment
assignment
- current assignmentenrollment
- an enrollment that was just assignedpublic void unassigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
SctAssignment
Request
.unassigned
in interface SctAssignment
assignment
- current assignmentenrollment
- an enrollment that was just unassignedpublic Set<Enrollment> getEnrollments(Assignment<Request,Enrollment> assignment)
getEnrollments
in interface SctAssignment
assignment
- current assignmentspublic int compareById(SctAssignment a)
SctAssignment
compareById
in interface SctAssignment
a
- another section assignmentpublic Enrollment createEnrollment()