public class StudentChoiceOrder extends Object implements StudentOrder, Comparator<Student>
Constructor and Description |
---|
StudentChoiceOrder(DataProperties config) |
Modifier and Type | Method and Description |
---|---|
double |
avgNrChoices(Student student)
Average number of choices for each student
|
int |
compare(Student s1,
Student s2) |
Request.RequestPriority |
getRequestPriority() |
boolean |
isCriticalOnly() |
boolean |
isReverse()
Is order reversed
|
List<Student> |
order(List<Student> students)
Order the given list of students
|
void |
setCriticalOnly(boolean critOnly) |
void |
setRequestPriority(Request.RequestPriority priority) |
void |
setReverse(boolean reverse)
Set reverse order
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public StudentChoiceOrder(DataProperties config)
public boolean isReverse()
public void setReverse(boolean reverse)
reverse
- true if students are to be in a reversed orderpublic boolean isCriticalOnly()
public void setCriticalOnly(boolean critOnly)
public void setRequestPriority(Request.RequestPriority priority)
public Request.RequestPriority getRequestPriority()
public List<Student> order(List<Student> students)
order
in interface StudentOrder
students
- input list of studentspublic int compare(Student s1, Student s2)
compare
in interface Comparator<Student>
public double avgNrChoices(Student student)
student
- given student