Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
InstructionComparator |
|
| 5.0;5 |
1 | package org.kuali.student.r2.core.class1.process.util; | |
2 | ||
3 | import java.util.Comparator; | |
4 | ||
5 | import org.kuali.student.r2.core.process.dto.InstructionInfo; | |
6 | ||
7 | 0 | public class InstructionComparator implements Comparator<InstructionInfo> { |
8 | ||
9 | @Override | |
10 | public int compare(InstructionInfo arg0, InstructionInfo arg1) { | |
11 | ||
12 | 0 | if (arg0.getPosition() > arg1.getPosition()) |
13 | 0 | return 1; |
14 | 0 | else if (arg0.getPosition() < arg1.getPosition()) |
15 | 0 | return -1; |
16 | ||
17 | 0 | return 0; |
18 | ||
19 | } | |
20 | ||
21 | } |