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:
parent
b25996d024
commit
67e6c4bdca
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user