Optimize UniqueName.compareTo(other) slightly

Replaces a manual check of IDs with one built in to Java

At least it makes the code smaller!

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
This commit is contained in:
Cruz Julian Bishop 2012-08-21 09:27:14 +10:00
parent b25996d024
commit 67e6c4bdca

View File

@ -103,13 +103,7 @@ public class UniqueName implements Comparable<UniqueName> {
return returnCode;
}
if (id < other.id) {
return -1;
} else if (id > other.id) {
return 1;
} else {
return 0;
}
return ((Integer) id).compareTo((Integer) other.id);
}
@Override