wzp
2021-03-24 7d0c47b5b751a53e8da57f69a9108d133b3e8650
1
2
3
4
5
6
7
8
9
10
11
12
package com.ots.project.exam.domain.comparator;
 
import com.ots.project.exam.domain.EntTestDetail;
 
import java.util.Comparator;
 
public class TimeSpentComparator implements Comparator<EntTestDetail> {
    @Override
    public int compare(EntTestDetail o1, EntTestDetail o2) {
        return o2.getTimeSpent().intValue() - o1.getTimeSpent().intValue();
    }
}