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) |
boolean |
isReverse()
Is order reversed
|
List<Student> |
order(List<Student> students)
Order the given list of students
|
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)
public List<Student> order(List<Student> students)
order
in interface StudentOrder
public int compare(Student s1, Student s2)
compare
in interface Comparator<Student>
public double avgNrChoices(Student student)