Use Long.compare in ChapterStartTimeComparator
This commit is contained in:
parent
002ba1753d
commit
14064cbe6f
|
@ -8,13 +8,7 @@ public class ChapterStartTimeComparator implements Comparator<Chapter> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(Chapter lhs, Chapter rhs) {
|
public int compare(Chapter lhs, Chapter rhs) {
|
||||||
if (lhs.getStart() == rhs.getStart()) {
|
return Long.compare(lhs.getStart(), rhs.getStart());
|
||||||
return 0;
|
|
||||||
} else if (lhs.getStart() < rhs.getStart()) {
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue