public class LinkedSections.LinkedSectionsConstraint extends Constraint<Request,Enrollment>
iAssignedVariables, iConstraintListeners, iId
Modifier | Constructor and Description |
---|---|
protected |
LinkedSectionsConstraint(Student student,
Collection<Request> requests)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
computeConflicts(Enrollment value,
Set<Enrollment> conflicts)
Compute conflicts using
LinkedSections.computeConflicts(Enrollment, ConflictHandler) |
LinkedSections |
getLinkedSections()
Return linked section
|
Student |
getStudent()
Return student
|
boolean |
inConflict(Enrollment value)
Check for conflict using
LinkedSections.inConflict(Enrollment) |
boolean |
isConsistent(Enrollment enrollment,
Enrollment other)
Check consistency using
LinkedSections.inConflict(Enrollment, Assignment) |
String |
toString() |
addConstraintListener, addVariable, assigned, assignedVariables, compareTo, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, getName, hashCode, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variables
protected LinkedSectionsConstraint(Student student, Collection<Request> requests)
student
- a studentrequests
- sub-set of student requests Student.getRequests()
that contains offerings of this linkpublic Student getStudent()
public LinkedSections getLinkedSections()
public void computeConflicts(Enrollment value, Set<Enrollment> conflicts)
LinkedSections.computeConflicts(Enrollment, ConflictHandler)
computeConflicts
in class Constraint<Request,Enrollment>
value
- value to be assigned to its varaibleconflicts
- resultant set of conflicting valuespublic boolean isConsistent(Enrollment enrollment, Enrollment other)
LinkedSections.inConflict(Enrollment, Assignment)
isConsistent
in class Constraint<Request,Enrollment>
public boolean inConflict(Enrollment value)
LinkedSections.inConflict(Enrollment)
inConflict
in class Constraint<Request,Enrollment>