if (other == null) {
result = -1;
} else {
Check.notNull(other.getGroups(), "other.getGroups()");
final int length = groups.size() < other.getGroups().size() ? groups.size() : other.getGroups().size();
final AlphanumComparator comparator = new AlphanumComparator();
result = comparator.compare(toVersionString(groups.subList(0, length)), toVersionString(other.getGroups().subList(0, length)));
if (result == 0) {
result = groups.size() > other.getGroups().size() ? 1 : groups.size() < other.getGroups().size() ? -1 : 0;
}
if (result == 0) {
result = extension.compareTo(other.getExtension());
}
if (result == 0) {
result = comparator.compare(toVersionString(), other.toVersionString());
}
}
return result;
}