mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
working on bug 1954: first of all, reducing the number of constructor invocatoins for NaturalComparator
This commit is contained in:
1 parent
ea73edf91c
commit
52ea7b1e57
6 files changed
+32
-24
No files matched your search
+2
-2
@@ -13,7 +13,7 @@ import java.util.Comparator;
|
||||
public class NaturalComparator implements Comparator<String> {
|
||||
boolean caseSensitive;
|
||||
|
||||
public NaturalComparator(boolean caseSensitive){
|
||||
public NaturalComparator(boolean caseSensitive) {
|
||||
this.caseSensitive = caseSensitive;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class NaturalComparator implements Comparator<String> {
|
||||
*/
|
||||
@Override
|
||||
public int compare(String a, String b) {
|
||||
if(!caseSensitive){
|
||||
if (!caseSensitive){
|
||||
a = a.toLowerCase();
|
||||
b = a.toLowerCase();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user