// Need to get statistic for comparison
if (!selectedSortOption.equals(SortingType.SortOption.ALPHABETICAL)
&& !selectedSortOption
.equals(SortingType.SortOption.LAST_ACTIVITY)) {
WordStatistic wordStatistic1 =
getStatisticForVersion(o1.getSlug());
WordStatistic wordStatistic2 =
getStatisticForVersion(o2.getSlug());
if (selectedSortOption
.equals(SortingType.SortOption.PERCENTAGE)) {
return Double.compare(
wordStatistic1.getPercentTranslated(),
wordStatistic2.getPercentTranslated());
} else if (selectedSortOption
.equals(SortingType.SortOption.HOURS)) {
return Double.compare(wordStatistic1.getRemainingHours(),
wordStatistic2.getRemainingHours());
} else if (selectedSortOption
.equals(SortingType.SortOption.WORDS)) {
if (wordStatistic1.getTotal() == wordStatistic2.getTotal()) {
return 0;
}
return wordStatistic1.getTotal() > wordStatistic2
.getTotal() ? 1 : -1;
}
} else if (selectedSortOption
.equals(SortingType.SortOption.ALPHABETICAL)) {
return o1.getSlug()